aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_psbt.py
diff options
context:
space:
mode:
authorMichael Dietz <michael.dietz@waya.ai>2021-02-01 09:52:07 -0600
committerMichael Dietz <michael.dietz@waya.ai>2021-03-23 10:51:43 -0400
commit085b3a729952896ccd0e40c17df569f4421f5493 (patch)
treeb6cfbbd212573c4d9af93cf03c21e39abc4352b0 /test/functional/rpc_psbt.py
parent3c87dbe95c925274f80234ad4a88beb5a05fdfff (diff)
downloadbitcoin-085b3a729952896ccd0e40c17df569f4421f5493.tar.xz
rpc: deprecate `addresses` and `reqSigs` from rpc outputs
1) add a new sane "address" field (for outputs that have an identifiable address, which doesn't include bare multisig) 2) with -deprecatedrpc: leave "reqSigs" and "addresses" intact (with all weird/wrong behavior they have now) 3) without -deprecatedrpc: drop "reqSigs" and "addresses" entirely, always.
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-xtest/functional/rpc_psbt.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index ed6abaed78..079a3bd3ba 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -158,17 +158,17 @@ class PSBTTest(BitcoinTestFramework):
p2sh_p2wpkh_pos = -1
decoded = self.nodes[0].decoderawtransaction(signed_tx)
for out in decoded['vout']:
- if out['scriptPubKey']['addresses'][0] == p2sh:
+ if out['scriptPubKey']['address'] == p2sh:
p2sh_pos = out['n']
- elif out['scriptPubKey']['addresses'][0] == p2wsh:
+ elif out['scriptPubKey']['address'] == p2wsh:
p2wsh_pos = out['n']
- elif out['scriptPubKey']['addresses'][0] == p2wpkh:
+ elif out['scriptPubKey']['address'] == p2wpkh:
p2wpkh_pos = out['n']
- elif out['scriptPubKey']['addresses'][0] == p2sh_p2wsh:
+ elif out['scriptPubKey']['address'] == p2sh_p2wsh:
p2sh_p2wsh_pos = out['n']
- elif out['scriptPubKey']['addresses'][0] == p2sh_p2wpkh:
+ elif out['scriptPubKey']['address'] == p2sh_p2wpkh:
p2sh_p2wpkh_pos = out['n']
- elif out['scriptPubKey']['addresses'][0] == p2pkh:
+ elif out['scriptPubKey']['address'] == p2pkh:
p2pkh_pos = out['n']
inputs = [{"txid": txid, "vout": p2wpkh_pos}, {"txid": txid, "vout": p2sh_p2wpkh_pos}, {"txid": txid, "vout": p2pkh_pos}]