tests: Add missing sync_all to wallet_importdescriptors.py

node1 will sometimes do sendtoaddress before it has received a funding
transaction which will cause the test to fail. sync_all to ensure it
gets the transaction first.
pull/18805/head
Andrew Chow 5 years ago
parent 6e3fc7492a
commit 7b2b06dfe3

@ -331,6 +331,7 @@ class ImportDescriptorsTest(BitcoinTestFramework):
assert_equal(wmulti_priv.getwalletinfo()['keypoolsize'], 1000) assert_equal(wmulti_priv.getwalletinfo()['keypoolsize'], 1000)
txid = w0.sendtoaddress(addr, 10) txid = w0.sendtoaddress(addr, 10)
self.nodes[0].generate(6) self.nodes[0].generate(6)
self.sync_all()
send_txid = wmulti_priv.sendtoaddress(w0.getnewaddress(), 8) send_txid = wmulti_priv.sendtoaddress(w0.getnewaddress(), 8)
decoded = wmulti_priv.decoderawtransaction(wmulti_priv.gettransaction(send_txid)['hex']) decoded = wmulti_priv.decoderawtransaction(wmulti_priv.gettransaction(send_txid)['hex'])
assert_equal(len(decoded['vin'][0]['txinwitness']), 4) assert_equal(len(decoded['vin'][0]['txinwitness']), 4)

Loading…
Cancel
Save