diff options
author | Andrew Chow <github@achow101.com> | 2023-03-16 14:36:34 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-03-16 14:48:10 -0400 |
commit | 09e86d7a1a695b0ad54b6c55d1ca2be9d2058d4b (patch) | |
tree | d5c304e5158c83299943bec22650aa4817365470 /src/wallet/scriptpubkeyman.cpp | |
parent | e695d8536e534f1e59de4a62a0d87a93e7a73456 (diff) | |
parent | 3dd2f6461b4bb28b2b212c691a3df28ac793ad91 (diff) |
Merge bitcoin/bitcoin#27200: test: psbt: check non-witness UTXO removal for segwit v1 input
3dd2f6461b4bb28b2b212c691a3df28ac793ad91 test: psbt: check non-witness UTXO removal for segwit v1 input (Sebastian Falbesoner)
dd78e3fa439d57e148a2a5e312021da962c4a394 test: speedup rpc_psbt.py by whitelisting peers (immediate tx relay) (Sebastian Falbesoner)
e194e3e93dd0665181bafeb162bf4c9f3621d6f1 test: PSBT: eliminate magic numbers for global unsigned tx key (0) (Sebastian Falbesoner)
Pull request description:
This PR adds missing test coverage for dropping non-witness UTXOs from PSBTs for segwit v1+ inputs (see commit 103c6fd2791f7e73eeab7f3900fbedd5b550211d). The formerly [disabled](https://github.com/bitcoin/bitcoin/commit/46004790588c24174a0bec49b540d158ce163ffd) method `test_utxo_conversion` is re-enabled and adapted to spend a Taproot (`bech32m`) instead of a wrapped SegWit (`p2sh-segwit`) output. Note that in contrast to the original test, we have to add the non-witness UTXO manually here using the test framework's PSBT module, since the constructing node knows that the output is segwit v1 and hence doesn't add the non-witness UTXO in the first place (see also [BIP371]( https://github.com/bitcoin/bips/blob/master/bip-0371.mediawiki#user-content-UTXO_Types)).
I strongly assume that most wallets would behave the same as Bitcoin Core here and wouldn't create PSBTs with non-witness UTXOs for Taproot inputs, but it's still good to test everything works as expected if it's still done and that the non-witness UTXO is simply dropped in that case.
The first two commits contain a small refactor (magic number elimination in PSBT module) and test speedup of ~2-3x (using whitelisting peers / immediate tx relay).
ACKs for top commit:
achow101:
ACK 3dd2f6461b4bb28b2b212c691a3df28ac793ad91
instagibbs:
ACK 3dd2f6461b4bb28b2b212c691a3df28ac793ad91
Tree-SHA512: b8d7f7ea5d7d21def024b70dfca61991cc96a4193be8857018b4d7cf3ca1465d185619fd4a77623803d9da309aa489c53273e9b7683d970ce12e2399b5b50031
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
0 files changed, 0 insertions, 0 deletions