Connect z_listreceivedaddress to the outside world

This commit is contained in:
Duke Leto
2020-09-09 11:42:52 -04:00
parent f4294a25cf
commit 5412da7d71
4 changed files with 14 additions and 5 deletions

View File

@@ -169,11 +169,11 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "z_listsentbyaddress", 3},
{ "z_listsentbyaddress", 4},
{ "z_listsentbyaddress", 5},
{ "z_listreceivedbyaddress", 1},
{ "z_listreceivedbyaddress", 2},
{ "z_listreceivedbyaddress", 3},
{ "z_listreceivedbyaddress", 4},
{ "z_listreceivedbyaddress", 5},
{ "z_listreceivedaddress", 1},
{ "z_listreceivedaddress", 2},
{ "z_listreceivedaddress", 3},
{ "z_listreceivedaddress", 4},
{ "z_listreceivedaddress", 5},
// crosschain
{ "assetchainproof", 1},

View File

@@ -652,6 +652,7 @@ static const CRPCCommand vRPCCommands[] =
{ "wallet", "walletpassphrasechange", &walletpassphrasechange, true },
{ "wallet", "walletpassphrase", &walletpassphrase, true },
{ "wallet", "z_listreceivedbyaddress",&z_listreceivedbyaddress,false },
{ "wallet", "z_listreceivedaddress", &z_listreceivedaddress, false },
{ "wallet", "z_getbalance", &z_getbalance, false },
{ "wallet", "z_gettotalbalance", &z_gettotalbalance, false },
{ "wallet", "z_mergetoaddress", &z_mergetoaddress, false },

View File

@@ -480,6 +480,7 @@ extern UniValue z_listnullifiers(const UniValue& params, bool fHelp, const CPubK
extern UniValue z_exportwallet(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcdump.cpp
extern UniValue z_importwallet(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcdump.cpp
extern UniValue z_listreceivedbyaddress(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp
extern UniValue z_listreceivedaddress(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp
extern UniValue z_getbalance(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp
extern UniValue z_gettotalbalance(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp
extern UniValue z_mergetoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp

View File

@@ -134,6 +134,9 @@ void zsTxSpendsToJSON(const CWalletTx& wtx, UniValue& spends, CAmount& totalSpen
void zsTxReceivedToJSON(const CWalletTx& wtx, UniValue& received, CAmount& totalReceived, const std::string& strAddress, bool filterByAddress) {
if(fZdebug)
fprintf(stderr,"%s: txid=%s\n", __func__, wtx.GetHash().ToString().c_str() );
LOCK2(cs_main, pwalletMain->cs_wallet);
//Check address
@@ -401,6 +404,10 @@ void zsWalletTxJSON(const CWalletTx& wtx, UniValue& ret, const std::string strAd
//Begin Compiling the Decrypted Transaction
tx.push_back(Pair("txid", wtx.GetHash().ToString()));
if(fZdebug)
fprintf(stderr,"%s: txid=%s\n", __func__, wtx.GetHash().ToString().c_str() );
if (wtx.IsCoinBase())
{
tx.push_back(Pair("coinbase", true));