From 15ced9b153ce12eb536dc05d02ebab5a0b983c89 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 23 Feb 2018 02:16:24 +0000 Subject: [PATCH] wallet_mergetoaddress: Add additional syncs to prevent race conditions --- qa/rpc-tests/wallet_mergetoaddress.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qa/rpc-tests/wallet_mergetoaddress.py b/qa/rpc-tests/wallet_mergetoaddress.py index fe7d5893e..e923b5788 100755 --- a/qa/rpc-tests/wallet_mergetoaddress.py +++ b/qa/rpc-tests/wallet_mergetoaddress.py @@ -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()