Skip to content

Commit c1a4713

Browse files
author
Tom Trevethan
committed
prevent reused utxo
1 parent b379bb2 commit c1a4713

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/mempool_unbroadcast.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def test_broadcast(self):
4141
# generate a wallet txn
4242
addr = node.getnewaddress()
4343
wallet_tx_hsh = node.sendtoaddress(addr, 0.0001)
44+
wallet_tx = node.gettransaction(wallet_tx_hsh,True,True)
45+
46+
# remove UTXO spent
47+
utxos = [utxo for utxo in utxos if utxo['txid'] != wallet_tx['decoded']['vin'][0]['txid']]
4448

4549
# generate a txn using sendrawtransaction
4650
us0 = utxos.pop()

0 commit comments

Comments
 (0)