mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 23:07:59 +01:00
test: Split up test_notfound_on_unannounced_tx test case
This commit is contained in:
parent
4e8a7654f6
commit
fadc8490ab
1 changed files with 6 additions and 3 deletions
|
@ -23,16 +23,19 @@ class P2PLeakTxTest(BitcoinTestFramework):
|
|||
self.num_nodes = 1
|
||||
|
||||
def run_test(self):
|
||||
gen_node = self.nodes[0] # The block and tx generating node
|
||||
miniwallet = MiniWallet(gen_node)
|
||||
self.gen_node = self.nodes[0] # The block and tx generating node
|
||||
self.miniwallet = MiniWallet(self.gen_node)
|
||||
|
||||
self.test_notfound_on_unannounced_tx()
|
||||
|
||||
def test_notfound_on_unannounced_tx(self):
|
||||
inbound_peer = self.nodes[0].add_p2p_connection(P2PNode()) # An "attacking" inbound peer
|
||||
|
||||
MAX_REPEATS = 100
|
||||
self.log.info("Running test up to {} times.".format(MAX_REPEATS))
|
||||
for i in range(MAX_REPEATS):
|
||||
self.log.info('Run repeat {}'.format(i + 1))
|
||||
txid = miniwallet.send_self_transfer(from_node=gen_node)['wtxid']
|
||||
txid = self.miniwallet.send_self_transfer(from_node=self.gen_node)["wtxid"]
|
||||
|
||||
want_tx = msg_getdata()
|
||||
want_tx.inv.append(CInv(t=MSG_TX, h=int(txid, 16)))
|
||||
|
|
Loading…
Add table
Reference in a new issue