aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/coins.cpp
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-05-20 08:48:00 +0100
committerMacroFake <falke.marco@gmail.com>2022-05-20 08:48:09 +0100
commita7e3afb22136367a236f1fbc6e30b43b6b366471 (patch)
tree4e9ccfd46f8d30e105f36d8adda8399d96a268be /src/wallet/rpc/coins.cpp
parenta39002e0c64220624336e344b870447d872b4810 (diff)
parenta4703ce9d79855ac0bd7dc07b71a51245f9aa5f8 (diff)
downloadbitcoin-a7e3afb22136367a236f1fbc6e30b43b6b366471.tar.xz
Merge bitcoin/bitcoin#25171: rpc: wallet: remove `-deprecatedrpc=exclude_coinbase` logic
a4703ce9d79855ac0bd7dc07b71a51245f9aa5f8 doc: add release notes about removal of the `deprecatedrpc=exclude_coinbase` (Sebastian Falbesoner) ef0aa74836c4339aa7f14fc1c9583d86dd5c388a rpc: wallet: remove `-deprecatedrpc=exclude_coinbase` logic (Sebastian Falbesoner) Pull request description: Including coinbase transactions in `receivedby` RPCs and adding the `-deprecatedrpc=exclude_coinbase` was done in PR #14707 (released in v23.0). For the next release v24.0, this configuration option can be removed. ACKs for top commit: fanquake: ACK a4703ce9d79855ac0bd7dc07b71a51245f9aa5f8 Tree-SHA512: 97cd4e78501e64f678c78d2ebb5be5376688c023e34fced71dd24e432d27aa31a74b5483545f49ba0bdf48656d8b8b7bee74e3db26cf6daf112613f1caa4dfa4
Diffstat (limited to 'src/wallet/rpc/coins.cpp')
-rw-r--r--src/wallet/rpc/coins.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/wallet/rpc/coins.cpp b/src/wallet/rpc/coins.cpp
index 0e7bf34c11..95296b4c9d 100644
--- a/src/wallet/rpc/coins.cpp
+++ b/src/wallet/rpc/coins.cpp
@@ -49,14 +49,6 @@ static CAmount GetReceived(const CWallet& wallet, const UniValue& params, bool b
const bool include_immature_coinbase{params[2].isNull() ? false : params[2].get_bool()};
- // Excluding coinbase outputs is deprecated
- // It can be enabled by setting deprecatedrpc=exclude_coinbase
- const bool include_coinbase{!wallet.chain().rpcEnableDeprecated("exclude_coinbase")};
-
- if (include_immature_coinbase && !include_coinbase) {
- throw JSONRPCError(RPC_INVALID_PARAMETER, "include_immature_coinbase is incompatible with deprecated exclude_coinbase");
- }
-
// Tally
CAmount amount = 0;
for (const std::pair<const uint256, CWalletTx>& wtx_pair : wallet.mapWallet) {
@@ -64,7 +56,7 @@ static CAmount GetReceived(const CWallet& wallet, const UniValue& params, bool b
int depth{wallet.GetTxDepthInMainChain(wtx)};
if (depth < min_depth
// Coinbase with less than 1 confirmation is no longer in the main chain
- || (wtx.IsCoinBase() && (depth < 1 || !include_coinbase))
+ || (wtx.IsCoinBase() && (depth < 1))
|| (wallet.IsTxImmatureCoinBase(wtx) && !include_immature_coinbase))
{
continue;