diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-08-09 17:20:23 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2022-08-10 11:58:17 -0400 |
commit | 70a55c059b014c7a687de7a4813a90c65148aed4 (patch) | |
tree | bb7a9565d8bcad26a6c232cc0f1f3a946812bc1c /test/functional/rpc_psbt.py | |
parent | ac59112a6a093e641ce2803260dd9de97b1cd961 (diff) | |
download | bitcoin-70a55c059b014c7a687de7a4813a90c65148aed4.tar.xz |
psbt: Avoid unsigned int overflow in PSBT_IN_TAP_BIP32_DERIVATION
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-x | test/functional/rpc_psbt.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index 43a73671a5..4583ca25cf 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -450,6 +450,7 @@ class PSBTTest(BitcoinTestFramework): with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data/rpc_psbt.json'), encoding='utf-8') as f: d = json.load(f) invalids = d['invalid'] + invalid_with_msgs = d["invalid_with_msg"] valids = d['valid'] creators = d['creator'] signers = d['signer'] @@ -460,6 +461,9 @@ class PSBTTest(BitcoinTestFramework): # Invalid PSBTs for invalid in invalids: assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decodepsbt, invalid) + for invalid in invalid_with_msgs: + psbt, msg = invalid + assert_raises_rpc_error(-22, f"TX decode failed {msg}", self.nodes[0].decodepsbt, psbt) # Valid PSBTs for valid in valids: |