wallet_mergetoaddress: Add additional syncs to prevent race conditions

This commit is contained in:
Jack Grigg 2018-02-23 02:16:24 +00:00
parent 2bda6a9b22
commit 15ced9b153
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with 5 additions and 0 deletions

View File

@ -180,6 +180,7 @@ class WalletMergeToAddressTest (BitcoinTestFramework):
assert_equal(result["mergingNotes"], Decimal('2'))
assert_equal(result["remainingNotes"], Decimal('0'))
wait_and_assert_operationid_status(self.nodes[0], result['opid'])
self.sync_all()
blockhash = self.nodes[1].generate(1)
self.sync_all()
@ -331,6 +332,7 @@ class WalletMergeToAddressTest (BitcoinTestFramework):
assert_equal(result["mergingNotes"], Decimal('2'))
assert_equal(result["remainingNotes"], Decimal('3'))
wait_and_assert_operationid_status(self.nodes[0], result['opid'])
self.sync_all()
self.nodes[1].generate(1)
self.sync_all()
@ -341,6 +343,9 @@ class WalletMergeToAddressTest (BitcoinTestFramework):
assert_equal(result["mergingNotes"], Decimal('2'))
assert_equal(result["remainingNotes"], Decimal('2'))
wait_and_assert_operationid_status(self.nodes[0], result['opid'])
# Don't sync node 2 which rejects the tx due to its mempooltxinputlimit
sync_blocks(self.nodes[:2])
sync_mempools(self.nodes[:2])
self.nodes[1].generate(1)
self.sync_all()