Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_leak_tx.py
Show All 25 Lines | class P2PLeakTxTest(BitcoinTestFramework): | ||||
def run_test(self): | def run_test(self): | ||||
# The block and tx generating node | # The block and tx generating node | ||||
gen_node = self.nodes[0] | gen_node = self.nodes[0] | ||||
gen_node.generate(1) | gen_node.generate(1) | ||||
# An "attacking" inbound peer | # An "attacking" inbound peer | ||||
inbound_peer = self.nodes[0].add_p2p_connection(P2PNode()) | inbound_peer = self.nodes[0].add_p2p_connection(P2PNode()) | ||||
# Backport note: the following two lines were backported out of order, | |||||
# and should be removed in the appropriate future backports that do a | |||||
# blanket removal of each of these calls across many tests. | |||||
self.nodes[0].p2p.wait_for_verack() | |||||
MAX_REPEATS = 100 | MAX_REPEATS = 100 | ||||
self.log.info("Running test up to {} times.".format(MAX_REPEATS)) | self.log.info("Running test up to {} times.".format(MAX_REPEATS)) | ||||
for i in range(MAX_REPEATS): | for i in range(MAX_REPEATS): | ||||
self.log.info('Run repeat {}'.format(i + 1)) | self.log.info('Run repeat {}'.format(i + 1)) | ||||
txid = gen_node.sendtoaddress(gen_node.getnewaddress(), 0.01) | txid = gen_node.sendtoaddress(gen_node.getnewaddress(), 0.01) | ||||
want_tx = msg_getdata() | want_tx = msg_getdata() | ||||
Show All 23 Lines |