wallet, rpc, test: Remove deprecated getunconfirmedbalance
This commit is contained in:
1 parent
0ec255139b
commit
c3fe85e2d6
3 files changed
-28
No files matched your search
@@ -214,29 +214,6 @@ RPCHelpMan getbalance()
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
RPCHelpMan getunconfirmedbalance()
|
|
||||||
{
|
|
||||||
return RPCHelpMan{"getunconfirmedbalance",
|
|
||||||
"DEPRECATED\nIdentical to getbalances().mine.untrusted_pending\n",
|
|
||||||
{},
|
|
||||||
RPCResult{RPCResult::Type::NUM, "", "The balance"},
|
|
||||||
RPCExamples{""},
|
|
||||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
|
||||||
{
|
|
||||||
const std::shared_ptr<const CWallet> pwallet = GetWalletForJSONRPCRequest(request);
|
|
||||||
if (!pwallet) return UniValue::VNULL;
|
|
||||||
|
|
||||||
// Make sure the results are valid at least up to the most recent block
|
|
||||||
// the user could have gotten from another RPC command prior to now
|
|
||||||
pwallet->BlockUntilSyncedToCurrentChain();
|
|
||||||
|
|
||||||
LOCK(pwallet->cs_wallet);
|
|
||||||
|
|
||||||
return ValueFromAmount(GetBalance(*pwallet).m_mine_untrusted_pending);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
RPCHelpMan lockunspent()
|
RPCHelpMan lockunspent()
|
||||||
{
|
{
|
||||||
return RPCHelpMan{
|
return RPCHelpMan{
|
||||||
|
|||||||
@@ -956,7 +956,6 @@ RPCHelpMan restorewallet();
|
|||||||
RPCHelpMan getreceivedbyaddress();
|
RPCHelpMan getreceivedbyaddress();
|
||||||
RPCHelpMan getreceivedbylabel();
|
RPCHelpMan getreceivedbylabel();
|
||||||
RPCHelpMan getbalance();
|
RPCHelpMan getbalance();
|
||||||
RPCHelpMan getunconfirmedbalance();
|
|
||||||
RPCHelpMan lockunspent();
|
RPCHelpMan lockunspent();
|
||||||
RPCHelpMan listlockunspent();
|
RPCHelpMan listlockunspent();
|
||||||
RPCHelpMan getbalances();
|
RPCHelpMan getbalances();
|
||||||
@@ -1016,7 +1015,6 @@ std::span<const CRPCCommand> GetWalletRPCCommands()
|
|||||||
{"wallet", &getreceivedbyaddress},
|
{"wallet", &getreceivedbyaddress},
|
||||||
{"wallet", &getreceivedbylabel},
|
{"wallet", &getreceivedbylabel},
|
||||||
{"wallet", &gettransaction},
|
{"wallet", &gettransaction},
|
||||||
{"wallet", &getunconfirmedbalance},
|
|
||||||
{"wallet", &getbalances},
|
{"wallet", &getbalances},
|
||||||
{"wallet", &getwalletinfo},
|
{"wallet", &getwalletinfo},
|
||||||
{"wallet", &importdescriptors},
|
{"wallet", &importdescriptors},
|
||||||
|
|||||||
@@ -167,9 +167,6 @@ class WalletTest(BitcoinTestFramework):
|
|||||||
# TODO: fix getbalance tracking of coin spentness depth
|
# TODO: fix getbalance tracking of coin spentness depth
|
||||||
assert_equal(self.nodes[0].getbalance(minconf=1), Decimal('0'))
|
assert_equal(self.nodes[0].getbalance(minconf=1), Decimal('0'))
|
||||||
assert_equal(self.nodes[1].getbalance(minconf=1), Decimal('0'))
|
assert_equal(self.nodes[1].getbalance(minconf=1), Decimal('0'))
|
||||||
# getunconfirmedbalance
|
|
||||||
assert_equal(self.nodes[0].getunconfirmedbalance(), Decimal('60')) # output of node 1's spend
|
|
||||||
assert_equal(self.nodes[1].getunconfirmedbalance(), Decimal('30') - fee_node_1) # Doesn't include output of node 0's send since it was spent
|
|
||||||
|
|
||||||
test_balances(fee_node_1=Decimal('0.01'))
|
test_balances(fee_node_1=Decimal('0.01'))
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user