Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc_p2p_compactproofs.py
Show First 20 Lines • Show All 617 Lines • ▼ Show 20 Lines | def test_send_inbound_getavaproofs_until_quorum_is_established(self): | ||||
self.restart_node( | self.restart_node( | ||||
0, | 0, | ||||
extra_args=self.extra_args[0] + | extra_args=self.extra_args[0] + | ||||
['-avaminquorumstake=1000000']) | ['-avaminquorumstake=1000000']) | ||||
assert_equal(node.getavalancheinfo()['active'], False) | assert_equal(node.getavalancheinfo()['active'], False) | ||||
outbound = HelloAvaP2PInterface() | outbound = AvaP2PInterface() | ||||
node.add_outbound_p2p_connection(outbound, p2p_idx=0) | node.add_outbound_p2p_connection(outbound, p2p_idx=0) | ||||
inbound = HelloAvaP2PInterface() | inbound = AvaP2PInterface() | ||||
node.add_p2p_connection(inbound) | node.add_p2p_connection(inbound) | ||||
inbound.nodeid = node.getpeerinfo()[-1]['id'] | inbound.nodeid = node.getpeerinfo()[-1]['id'] | ||||
def count_getavaproofs(peers): | def count_getavaproofs(peers): | ||||
with p2p_lock: | with p2p_lock: | ||||
return sum([peer.message_count.get("getavaproofs", 0) | return sum([peer.message_count.get("getavaproofs", 0) | ||||
for peer in peers]) | for peer in peers]) | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |