Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_eviction.py
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | def set_test_params(self): | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
# The choice of maxconnections=188 results in a maximum of 153 inbound | # The choice of maxconnections=188 results in a maximum of 153 inbound | ||||
# connections (188 - 34 outbound - 1 feeler). The 34 outbounds count is | # connections (188 - 34 outbound - 1 feeler). The 34 outbounds count is | ||||
# from 16 full-relay + 16 avalanche + 2 block-only-relay. | # from 16 full-relay + 16 avalanche + 2 block-only-relay. | ||||
# 152 inbound peers are protected from eviction: | # 152 inbound peers are protected from eviction: | ||||
# 4 by netgroup, 4 that sent us blocks, 4 that sent us proofs, 4 that | # 4 by netgroup, 4 that sent us blocks, 4 that sent us proofs, 4 that | ||||
# sent us transactions, 8 via lowest ping time, 128 with the best | # sent us transactions, 8 via lowest ping time, 128 with the best | ||||
# avalanche availability score | # avalanche availability score | ||||
self.extra_args = [['-maxconnections=188', | self.extra_args = [["-maxconnections=188", | ||||
"-enableavalanche=1", "-maxavalancheoutbound=16"]] | "-enableavalanche=1", | ||||
"-avaproofstakeutxoconfirmations=0", | |||||
"-maxavalancheoutbound=16"]] | |||||
def run_test(self): | def run_test(self): | ||||
# peers that we expect to be protected from eviction | # peers that we expect to be protected from eviction | ||||
protected_peers = set() | protected_peers = set() | ||||
current_peer = -1 | current_peer = -1 | ||||
node = self.nodes[0] | node = self.nodes[0] | ||||
blocks = node.generatetoaddress( | blocks = node.generatetoaddress( | ||||
101, node.get_deterministic_priv_key().address) | 101, node.get_deterministic_priv_key().address) | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |