aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_rbf.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/feature_rbf.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/feature_rbf.py')
-rwxr-xr-xtest/functional/feature_rbf.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py
index c6f55c62b4..945880cc3b 100755
--- a/test/functional/feature_rbf.py
+++ b/test/functional/feature_rbf.py
@@ -33,12 +33,7 @@ def make_utxo(node, amount, confirmed=True, scriptPubKey=DUMMY_P2WPKH_SCRIPT):
txid = node.sendtoaddress(new_addr, satoshi_round((amount+fee)/COIN))
tx1 = node.getrawtransaction(txid, 1)
txid = int(txid, 16)
- i = None
-
- for i, txout in enumerate(tx1['vout']):
- if txout['scriptPubKey']['addresses'] == [new_addr]:
- break
- assert i is not None
+ i, _ = next(filter(lambda vout: new_addr == vout[1]['scriptPubKey']['address'], enumerate(tx1['vout'])))
tx2 = CTransaction()
tx2.vin = [CTxIn(COutPoint(txid, i))]