Skip to content

Commit 4cbab15

Browse files
tests: Fix accidental redefinition of previously defined variable via list comprehension
1 parent 0b9207e commit 4cbab15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/rpc_fundrawtransaction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ def run_test(self):
223223
assert_raises_rpc_error(-1, "JSON value is not a string as expected", self.nodes[2].fundrawtransaction, rawtx, {'change_type': None})
224224
assert_raises_rpc_error(-5, "Unknown change type", self.nodes[2].fundrawtransaction, rawtx, {'change_type': ''})
225225
rawtx = self.nodes[2].fundrawtransaction(rawtx, {'change_type': 'bech32'})
226-
tx = self.nodes[2].decoderawtransaction(rawtx['hex'])
227-
assert_equal('witness_v0_keyhash', tx['vout'][rawtx['changepos']]['scriptPubKey']['type'])
226+
dec_tx = self.nodes[2].decoderawtransaction(rawtx['hex'])
227+
assert_equal('witness_v0_keyhash', dec_tx['vout'][rawtx['changepos']]['scriptPubKey']['type'])
228228

229229
#########################################################################
230230
# test a fundrawtransaction with a VIN smaller than the required amount #
@@ -676,7 +676,7 @@ def run_test(self):
676676
self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 2*min_relay_tx_fee}),
677677
self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 2*min_relay_tx_fee, "subtractFeeFromOutputs": [0]})]
678678

679-
dec_tx = [self.nodes[3].decoderawtransaction(tx['hex']) for tx in result]
679+
dec_tx = [self.nodes[3].decoderawtransaction(tx_['hex']) for tx_ in result]
680680
output = [d['vout'][1 - r['changepos']]['value'] for d, r in zip(dec_tx, result)]
681681
change = [d['vout'][r['changepos']]['value'] for d, r in zip(dec_tx, result)]
682682

0 commit comments

Comments
 (0)