MCPcopy Create free account
hub / github.com/ElementsProject/elements / get_change_address

Function get_change_address

test/functional/wallet_bumpfee.py:568–571  ·  view source on GitHub ↗
(tx)

Source from the content-addressed store, hash-verified

566 self.log.info('Test that the same change addresses is used for the replacement transaction when possible')
567
568 def get_change_address(tx):
569 tx_details = rbf_node.getrawtransaction(tx, 1)
570 txout_addresses = [txout['scriptPubKey']['address'] for txout in tx_details["vout"] if txout['scriptPubKey']['type'] != 'fee']
571 return [address for address in txout_addresses if rbf_node.getaddressinfo(address)["ischange"]]
572
573 # Check that there is only one change output
574 rbfid = spend_one_input(rbf_node, dest_address)

Callers 1

test_change_script_matchFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_change_script_matchFunction · 0.68