mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-19 05:45:05 +01:00
test: Add missing syncwithvalidationinterfacequeue
This commit is contained in:
parent
9aa8145bc0
commit
faf6f156ff
@ -12,6 +12,7 @@ from test_framework.mininode import P2PInterface, mininode_lock
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import assert_equal, wait_until
|
||||
|
||||
|
||||
class P2PStoreTxInvs(P2PInterface):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@ -24,6 +25,7 @@ class P2PStoreTxInvs(P2PInterface):
|
||||
# save txid
|
||||
self.tx_invs_received[i.hash] += 1
|
||||
|
||||
|
||||
class ResendWalletTransactionsTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 1
|
||||
@ -63,6 +65,7 @@ class ResendWalletTransactionsTest(BitcoinTestFramework):
|
||||
node.submitblock(ToHex(block))
|
||||
|
||||
# Transaction should not be rebroadcast
|
||||
node.syncwithvalidationinterfacequeue()
|
||||
node.p2ps[1].sync_with_ping()
|
||||
assert_equal(node.p2ps[1].tx_invs_received[txid], 0)
|
||||
|
||||
@ -72,5 +75,6 @@ class ResendWalletTransactionsTest(BitcoinTestFramework):
|
||||
node.setmocktime(rebroadcast_time)
|
||||
wait_until(lambda: node.p2ps[1].tx_invs_received[txid] >= 1, lock=mininode_lock)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
ResendWalletTransactionsTest().main()
|
||||
|
Loading…
Reference in New Issue
Block a user