Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_inv_download.py
Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | def test_expiry_fallback(self, context): | ||||
int(time.time()) + context.constants.getdata_interval + 1) | int(time.time()) + context.constants.getdata_interval + 1) | ||||
peer_fallback.wait_until( | peer_fallback.wait_until( | ||||
lambda: peer_fallback.getdata_count >= 1, timeout=1) | lambda: peer_fallback.getdata_count >= 1, timeout=1) | ||||
with p2p_lock: | with p2p_lock: | ||||
assert_equal(peer_fallback.getdata_count, 1) | assert_equal(peer_fallback.getdata_count, 1) | ||||
# reset mocktime | # reset mocktime | ||||
self.restart_node(0) | self.restart_node(0) | ||||
@skip(PROOF_TEST_CONTEXT) | |||||
def test_disconnect_fallback(self, context): | def test_disconnect_fallback(self, context): | ||||
self.log.info( | self.log.info( | ||||
'Check that disconnect will select another peer for download') | 'Check that disconnect will select another peer for download') | ||||
peer1 = self.nodes[0].add_p2p_connection(context.p2p_conn()) | peer1 = self.nodes[0].add_p2p_connection(context.p2p_conn()) | ||||
peer2 = self.nodes[0].add_p2p_connection(context.p2p_conn()) | peer2 = self.nodes[0].add_p2p_connection(context.p2p_conn()) | ||||
for p in [peer1, peer2]: | for p in [peer1, peer2]: | ||||
p.send_message(msg_inv([CInv(t=context.inv_type, h=0xffbb)])) | p.send_message(msg_inv([CInv(t=context.inv_type, h=0xffbb)])) | ||||
# One of the peers is asked for the data | # One of the peers is asked for the data | ||||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |