Skip to content

Commit fadc849

Browse files
author
MarcoFalke
committed
test: Split up test_notfound_on_unannounced_tx test case
1 parent 4e8a765 commit fadc849

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/functional/p2p_leak_tx.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ def set_test_params(self):
2323
self.num_nodes = 1
2424

2525
def run_test(self):
26-
gen_node = self.nodes[0] # The block and tx generating node
27-
miniwallet = MiniWallet(gen_node)
26+
self.gen_node = self.nodes[0] # The block and tx generating node
27+
self.miniwallet = MiniWallet(self.gen_node)
2828

29+
self.test_notfound_on_unannounced_tx()
30+
31+
def test_notfound_on_unannounced_tx(self):
2932
inbound_peer = self.nodes[0].add_p2p_connection(P2PNode()) # An "attacking" inbound peer
3033

3134
MAX_REPEATS = 100
3235
self.log.info("Running test up to {} times.".format(MAX_REPEATS))
3336
for i in range(MAX_REPEATS):
3437
self.log.info('Run repeat {}'.format(i + 1))
35-
txid = miniwallet.send_self_transfer(from_node=gen_node)['wtxid']
38+
txid = self.miniwallet.send_self_transfer(from_node=self.gen_node)["wtxid"]
3639

3740
want_tx = msg_getdata()
3841
want_tx.inv.append(CInv(t=MSG_TX, h=int(txid, 16)))

0 commit comments

Comments
 (0)