From caf7178ffd550351bb8cc169bc363644f2c4a762 Mon Sep 17 00:00:00 2001 From: Duke Date: Tue, 14 Oct 2025 10:57:40 -0400 Subject: [PATCH] Allow donation=0 --- qa/rpc-tests/shieldcoinbase_donation.py | 2 -- src/wallet/rpcwallet.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/qa/rpc-tests/shieldcoinbase_donation.py b/qa/rpc-tests/shieldcoinbase_donation.py index dc77ef0c1..e50c1ea3c 100755 --- a/qa/rpc-tests/shieldcoinbase_donation.py +++ b/qa/rpc-tests/shieldcoinbase_donation.py @@ -153,5 +153,3 @@ class ShieldCoinbaseDonationTest (BitcoinTestFramework): if __name__ == '__main__': ShieldCoinbaseDonationTest().main() - - diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 0272ca089..1896044e4 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5562,7 +5562,7 @@ UniValue z_shieldcoinbase(const UniValue& params, bool fHelp, const CPubKey& myp uint8_t donation = 0; if (params.size() > 4) { donation = params[4].get_int(); - if (donation < 1 || donation > 10 ) { + if (donation < 0 || donation > 10 ) { throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid donation percentage, must be an integer between 1 and 10"); } }