diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index a16dde687..6d5a166b4 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -428,7 +428,6 @@ static const CRPCCommand vRPCCommands[] = { "wallet", "getaddressesbyaccount", &getaddressesbyaccount, true }, { "wallet", "cleanwallettransactions", &cleanwallettransactions, false }, { "wallet", "getbalance", &getbalance, false }, - { "wallet", "getbalance64", &getbalance64, false }, { "wallet", "getnewaddress", &getnewaddress, true }, { "wallet", "getrawchangeaddress", &getrawchangeaddress, true }, { "wallet", "getreceivedbyaccount", &getreceivedbyaccount, false }, diff --git a/src/rpc/server.h b/src/rpc/server.h index eff98f9c2..08c60fe16 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -258,7 +258,6 @@ extern UniValue getreceivedbyaddress(const UniValue& params, bool fHelp, const C extern UniValue getreceivedbyaccount(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue cleanwallettransactions(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue getbalance(const UniValue& params, bool fHelp, const CPubKey& mypk); -extern UniValue getbalance64(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue getunconfirmedbalance(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue movecmd(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue sendfrom(const UniValue& params, bool fHelp, const CPubKey& mypk); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 6eeafd012..e53fbec1e 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -6255,49 +6255,6 @@ UniValue setpubkey(const UniValue& params, bool fHelp, const CPubKey& mypk) return result; } -UniValue getbalance64(const UniValue& params, bool fHelp, const CPubKey& mypk) -{ - set setAddress; vector vecOutputs; - UniValue ret(UniValue::VOBJ); UniValue a(UniValue::VARR),b(UniValue::VARR); CTxDestination address; - if (!EnsureWalletIsAvailable(fHelp)) - return NullUniValue; - - const CKeyStore& keystore = *pwalletMain; - CAmount nValues[64],nValues2[64],nValue,total,total2; int32_t i,segid; - if (!EnsureWalletIsAvailable(fHelp)) - return NullUniValue; - if (params.size() > 0) - throw runtime_error("getbalance64\n"); - total = total2 = 0; - memset(nValues,0,sizeof(nValues)); - memset(nValues2,0,sizeof(nValues2)); - LOCK2(cs_main, pwalletMain->cs_wallet); - pwalletMain->AvailableCoins(vecOutputs, false, NULL, true); - BOOST_FOREACH(const COutput& out, vecOutputs) - { - nValue = out.tx->vout[out.i].nValue; - if ( ExtractDestination(out.tx->vout[out.i].scriptPubKey, address) ) - { - segid = (hush_segid32((char *)CBitcoinAddress(address).ToString().c_str()) & 0x3f); - if ( out.nDepth < 100 ) - nValues2[segid] += nValue, total2 += nValue; - else nValues[segid] += nValue, total += nValue; - //fprintf(stderr,"%s %.8f depth.%d segid.%d\n",(char *)CBitcoinAddress(address).ToString().c_str(),(double)nValue/COIN,(int32_t)out.nDepth,segid); - } else fprintf(stderr,"no destination\n"); - } - ret.push_back(Pair("mature",(double)total/COIN)); - ret.push_back(Pair("immature",(double)total2/COIN)); - for (i=0; i<64; i++) - { - a.push_back((uint64_t)nValues[i]); - b.push_back((uint64_t)nValues2[i]); - } - ret.push_back(Pair("staking", a)); - ret.push_back(Pair("notstaking", b)); - return ret; -} - - extern UniValue dumpprivkey(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcdump.cpp extern UniValue convertpassphrase(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue importprivkey(const UniValue& params, bool fHelp, const CPubKey& mypk);