Skip to content

Commit fa0ac9d

Browse files
author
MarcoFalke
committed
test: Fix rpc_scantxoutset intermittent issue
1 parent 3699786 commit fa0ac9d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/functional/rpc_scantxoutset.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ def run_test(self):
3131
pubk2 = self.nodes[0].getaddressinfo(addr_LEGACY)['pubkey']
3232
addr_BECH32 = self.nodes[0].getnewaddress("", "bech32")
3333
pubk3 = self.nodes[0].getaddressinfo(addr_BECH32)['pubkey']
34-
self.nodes[0].sendtoaddress(addr_P2SH_SEGWIT, 0.001)
35-
self.nodes[0].sendtoaddress(addr_LEGACY, 0.002)
36-
self.nodes[0].sendtoaddress(addr_BECH32, 0.004)
34+
txid = self.nodes[0].sendtoaddress(addr_P2SH_SEGWIT, 0.001)
35+
self.nodes[0].lockunspent(unlock=False, transactions=[{"txid": txid, "vout": 0}, {"txid": txid, "vout": 1}])
36+
txid = self.nodes[0].sendtoaddress(addr_LEGACY, 0.002)
37+
self.nodes[0].lockunspent(unlock=False, transactions=[{"txid": txid, "vout": 0}, {"txid": txid, "vout": 1}])
38+
txid = self.nodes[0].sendtoaddress(addr_BECH32, 0.004)
39+
self.nodes[0].lockunspent(unlock=False, transactions=[{"txid": txid, "vout": 0}, {"txid": txid, "vout": 1}])
3740

3841
#send to child keys of tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK
3942
self.nodes[0].sendtoaddress("mkHV1C6JLheLoUSSZYk7x3FH5tnx9bu7yc", 0.008) # (m/0'/0'/0')

0 commit comments

Comments
 (0)