@@ -223,8 +223,8 @@ def run_test(self):
223
223
assert_raises_rpc_error (- 1 , "JSON value is not a string as expected" , self .nodes [2 ].fundrawtransaction , rawtx , {'change_type' : None })
224
224
assert_raises_rpc_error (- 5 , "Unknown change type" , self .nodes [2 ].fundrawtransaction , rawtx , {'change_type' : '' })
225
225
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' ])
228
228
229
229
#########################################################################
230
230
# test a fundrawtransaction with a VIN smaller than the required amount #
@@ -676,7 +676,7 @@ def run_test(self):
676
676
self .nodes [3 ].fundrawtransaction (rawtx , {"feeRate" : 2 * min_relay_tx_fee }),
677
677
self .nodes [3 ].fundrawtransaction (rawtx , {"feeRate" : 2 * min_relay_tx_fee , "subtractFeeFromOutputs" : [0 ]})]
678
678
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 ]
680
680
output = [d ['vout' ][1 - r ['changepos' ]]['value' ] for d , r in zip (dec_tx , result )]
681
681
change = [d ['vout' ][r ['changepos' ]]['value' ] for d , r in zip (dec_tx , result )]
682
682
0 commit comments