mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 16:53:52 +02:00
[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.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user