New listaddresses RPC and z_exportwallet RPC now can be called during RPC warmup

This commit is contained in:
Duke Leto
2021-09-02 12:22:04 -04:00
parent 59fbcbb541
commit b4cf845bf3
12 changed files with 29 additions and 288 deletions

View File

@@ -252,7 +252,7 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
obj.push_back(Pair("notarizedtxid", notarized_desttxid.ToString()));
if ( HUSH_NSPV_FULLNODE )
{
txid_height = notarizedtxid_height(SMART_CHAIN_SYMBOL[0] != 0 ? (char *)"HUSH3" : (char *)"BTC",(char *)notarized_desttxid.ToString().c_str(),&hushnotarized_height);
txid_height = notarizedtxid_height( (char *)"HUSH3" ,(char *)notarized_desttxid.ToString().c_str(),&hushnotarized_height);
if ( txid_height > 0 )
obj.push_back(Pair("notarizedtxid_height", txid_height));
else obj.push_back(Pair("notarizedtxid_height", "mempool"));

View File

@@ -831,7 +831,8 @@ UniValue CRPCTable::execute(const std::string &strMethod, const UniValue &params
// few RPCs means we can see our addresses and make private key backups
// while a very long wallet rescan is happening
if (pcmd->name != "stop" && pcmd->name != "help" && pcmd->name != "z_listaddresses" && pcmd->name != "z_exportkey" &&
pcmd->name != "getaddressesbyaccount" && pcmd->name != "dumpprivkey" && pcmd->name != "getpeerinfo" ) {
pcmd->name != "getaddressesbyaccount" && pcmd->name != "listaddresses" && pcmd->name != "z_exportwallet" &&
pcmd->name != "dumpprivkey" && pcmd->name != "getpeerinfo" ) {
throw JSONRPCError(RPC_IN_WARMUP, rpcWarmupStatus);
}
}