Skip to content

Commit c3fe85e

Browse files
committed
wallet, rpc, test: Remove deprecated getunconfirmedbalance
1 parent 0ec2551 commit c3fe85e

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

src/wallet/rpc/coins.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -214,29 +214,6 @@ RPCHelpMan getbalance()
214214
};
215215
}
216216

217-
RPCHelpMan getunconfirmedbalance()
218-
{
219-
return RPCHelpMan{"getunconfirmedbalance",
220-
"DEPRECATED\nIdentical to getbalances().mine.untrusted_pending\n",
221-
{},
222-
RPCResult{RPCResult::Type::NUM, "", "The balance"},
223-
RPCExamples{""},
224-
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
225-
{
226-
const std::shared_ptr<const CWallet> pwallet = GetWalletForJSONRPCRequest(request);
227-
if (!pwallet) return UniValue::VNULL;
228-
229-
// Make sure the results are valid at least up to the most recent block
230-
// the user could have gotten from another RPC command prior to now
231-
pwallet->BlockUntilSyncedToCurrentChain();
232-
233-
LOCK(pwallet->cs_wallet);
234-
235-
return ValueFromAmount(GetBalance(*pwallet).m_mine_untrusted_pending);
236-
},
237-
};
238-
}
239-
240217
RPCHelpMan lockunspent()
241218
{
242219
return RPCHelpMan{

src/wallet/rpc/wallet.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,6 @@ RPCHelpMan restorewallet();
956956
RPCHelpMan getreceivedbyaddress();
957957
RPCHelpMan getreceivedbylabel();
958958
RPCHelpMan getbalance();
959-
RPCHelpMan getunconfirmedbalance();
960959
RPCHelpMan lockunspent();
961960
RPCHelpMan listlockunspent();
962961
RPCHelpMan getbalances();
@@ -1016,7 +1015,6 @@ std::span<const CRPCCommand> GetWalletRPCCommands()
10161015
{"wallet", &getreceivedbyaddress},
10171016
{"wallet", &getreceivedbylabel},
10181017
{"wallet", &gettransaction},
1019-
{"wallet", &getunconfirmedbalance},
10201018
{"wallet", &getbalances},
10211019
{"wallet", &getwalletinfo},
10221020
{"wallet", &importdescriptors},

test/functional/wallet_balance.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ def test_balances(*, fee_node_1=0):
167167
# TODO: fix getbalance tracking of coin spentness depth
168168
assert_equal(self.nodes[0].getbalance(minconf=1), Decimal('0'))
169169
assert_equal(self.nodes[1].getbalance(minconf=1), Decimal('0'))
170-
# getunconfirmedbalance
171-
assert_equal(self.nodes[0].getunconfirmedbalance(), Decimal('60')) # output of node 1's spend
172-
assert_equal(self.nodes[1].getunconfirmedbalance(), Decimal('30') - fee_node_1) # Doesn't include output of node 0's send since it was spent
173170

174171
test_balances(fee_node_1=Decimal('0.01'))
175172

0 commit comments

Comments
 (0)