Skip to content

Commit

Permalink
Merge #23200: Fix intermittent failure in wallet_send.py and rpc_fund…
Browse files Browse the repository at this point in the history
…rawtransaction.py

75a9305 Fix intermittent test failures due to missing sync_all (Samuel Dobson)
eb02dbb Use self.generate not node.generate throughout tests (Samuel Dobson)

Pull request description:

  After #17211 was merged, there have been a few intermittent test failures in `wallet_send.py`, `rpc_fundrawtransaction.py`, and `rpc_psbt.py`

  I believe all these failures are due to these missing `sync_all()`s

ACKs for top commit:
  achow101:
    ACK 75a9305
  lsilva01:
    Tested ACK 75a9305 on Ubuntu 20.04

Tree-SHA512: 91de5763664046e5a35802eb1a9a28f69a1a27d78d26c9fa0024bcfab4ccb4b7ad4feebea7de4b19e141db9c39270c623c57c47942a48dfe679fdc8cad70df43
  • Loading branch information
MarcoFalke committed Oct 6, 2021
2 parents 113b863 + 75a9305 commit 66d11b1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/functional/interface_zmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def test_ipv6(self):
], ipv6=True)

# Generate 1 block in nodes[0]
self.nodes[0].generatetoaddress(1, ADDRESS_BCRT1_UNSPENDABLE)
self.generatetoaddress(self.nodes[0], 1, ADDRESS_BCRT1_UNSPENDABLE)

# Should receive the same block hash
assert_equal(self.nodes[0].getbestblockhash(), subscribers[0].receive().hex())
Expand Down
2 changes: 1 addition & 1 deletion test/functional/p2p_compactblocks_blocksonly.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def setup_network(self):
self.sync_all()

def build_block_on_tip(self):
blockhash = self.nodes[2].generate(1)[0]
blockhash = self.generate(self.nodes[2], 1)[0]
block_hex = self.nodes[2].getblock(blockhash=blockhash, verbosity=0)
block = from_hex(CBlock(), block_hex)
block.rehash()
Expand Down
3 changes: 2 additions & 1 deletion test/functional/rpc_fundrawtransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,8 @@ def test_external_inputs(self):

self.nodes[0].sendtoaddress(addr, 10)
self.nodes[0].sendtoaddress(wallet.getnewaddress(), 10)
self.nodes[0].generate(6)
self.generate(self.nodes[0], 6)
self.sync_all()
ext_utxo = self.nodes[0].listunspent(addresses=[addr])[0]

# An external input without solving data should result in an error
Expand Down
3 changes: 2 additions & 1 deletion test/functional/rpc_psbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ def test_psbt_input_keys(psbt_input, keys):
addr_info = self.nodes[0].getaddressinfo(addr)

self.nodes[0].sendtoaddress(addr, 10)
self.nodes[0].generate(6)
self.generate(self.nodes[0], 6)
self.sync_all()
ext_utxo = self.nodes[0].listunspent(addresses=[addr])[0]

# An external input without solving data should result in an error
Expand Down
3 changes: 2 additions & 1 deletion test/functional/wallet_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,8 @@ def run_test(self):

self.nodes[0].sendtoaddress(addr, 10)
self.nodes[0].sendtoaddress(ext_wallet.getnewaddress(), 10)
self.nodes[0].generate(6)
self.generate(self.nodes[0], 6)
self.sync_all()
ext_utxo = ext_fund.listunspent(addresses=[addr])[0]

# An external input without solving data should result in an error
Expand Down

0 comments on commit 66d11b1

Please sign in to comment.