From 101071722ee839668ed70eafccfd2f22d636940d Mon Sep 17 00:00:00 2001 From: rkrux Date: Wed, 13 May 2026 17:06:51 +0530 Subject: [PATCH 01/26] psbt, test: remove address type restrictions in test Because the corresponding Taproot fields were added in PSBT in PR 22558, so these restrictions are no longer necessary. Github-Pull: #35279 Rebased-From: 81348576cc411a63da295a10a3846302419a18e0 --- test/functional/rpc_psbt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index cc443f6a7cf..35c694d7454 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -65,7 +65,7 @@ class PSBTTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 3 self.extra_args = [ - ["-walletrbf=1", "-addresstype=bech32", "-changetype=bech32"], #TODO: Remove address type restrictions once taproot has psbt extensions + ["-walletrbf=1"], ["-walletrbf=0", "-changetype=legacy"], [] ] From 671e6c2c33bc8b1eb04dc9b682ab81e9fb3b5de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc?= Date: Wed, 6 May 2026 14:27:13 +0200 Subject: [PATCH 02/26] wallet: use outpoint when estimating input size `CalculateMaximumSignedInputSize()` is passed the outpoint being sized, but that context was not used when estimating the signed input size. Pass the outpoint through so externally selected inputs are not underestimated. Co-authored-by: Antoine Poinsot Github-Pull: #35228 Rebased-From: cd8d3bd937b5515ea000408eb07d2ae3cd1aa417 --- src/wallet/spend.cpp | 2 +- src/wallet/test/spend_tests.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index 3d150426404..613375385d3 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -94,7 +94,7 @@ int CalculateMaximumSignedInputSize(const CTxOut& txout, const COutPoint outpoin if (!provider) return -1; if (const auto desc = InferDescriptor(txout.scriptPubKey, *provider)) { - if (const auto weight = MaxInputWeight(*desc, {}, coin_control, true, can_grind_r)) { + if (const auto weight = MaxInputWeight(*desc, CTxIn{outpoint}, coin_control, true, can_grind_r)) { return static_cast(GetVirtualTransactionSize(*weight, 0, 0)); } } diff --git a/src/wallet/test/spend_tests.cpp b/src/wallet/test/spend_tests.cpp index 866ffa48c20..218792ff033 100644 --- a/src/wallet/test/spend_tests.cpp +++ b/src/wallet/test/spend_tests.cpp @@ -3,6 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include +#include #include #include