From 52b760fc6a9b26e405a0553ee8285b0f03ca1604 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Wed, 20 Mar 2019 17:46:38 -0400 Subject: [wallet] Schedule tx rebroadcasts in wallet Removes the now-unused Broadcast/ResendWalletTransactions interface from validationinterface. The wallet_resendwallettransactions.py needs a sleep added at the start to make sure that the rebroadcast scheduler is warmed up before the next block is mined. --- test/functional/wallet_resendwallettransactions.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/functional/wallet_resendwallettransactions.py b/test/functional/wallet_resendwallettransactions.py index 8aafa94c2e..ec5e230e5a 100755 --- a/test/functional/wallet_resendwallettransactions.py +++ b/test/functional/wallet_resendwallettransactions.py @@ -39,6 +39,12 @@ class ResendWalletTransactionsTest(BitcoinTestFramework): self.log.info("Create a new transaction and wait until it's broadcast") txid = int(node.sendtoaddress(node.getnewaddress(), 1), 16) + # Wallet rebroadcast is first scheduled 1 sec after startup (see + # nNextResend in ResendWalletTransactions()). Sleep for just over a + # second to be certain that it has been called before the first + # setmocktime call below. + time.sleep(1.1) + # Can take a few seconds due to transaction trickling wait_until(lambda: node.p2p.tx_invs_received[txid] >= 1, lock=mininode_lock) -- cgit v1.2.3