Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_maxuploadtarget.py
Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
p2p_conns[2].sync_with_ping() | p2p_conns[2].sync_with_ping() | ||||
p2p_conns[2].send_and_ping(getdata_request) | p2p_conns[2].send_and_ping(getdata_request) | ||||
assert_equal(p2p_conns[2].block_receive_map[big_old_block], 1) | assert_equal(p2p_conns[2].block_receive_map[big_old_block], 1) | ||||
self.log.info("Peer 2 able to download old block") | self.log.info("Peer 2 able to download old block") | ||||
self.nodes[0].disconnect_p2ps() | self.nodes[0].disconnect_p2ps() | ||||
# stop and start node 0 with 1MB maxuploadtarget, whitelist 127.0.0.1 | self.log.info("Restarting node 0 with noban permission" | ||||
self.log.info("Restarting nodes with -whitelist=127.0.0.1") | " and 1MB maxuploadtarget") | ||||
self.stop_node(0) | self.stop_node(0) | ||||
self.start_node(0, ["-whitelist=127.0.0.1", | self.start_node(0, ["-whitelist=noban@127.0.0.1", | ||||
"-maxuploadtarget=1", "-blockmaxsize=999000"]) | "-maxuploadtarget=1", "-blockmaxsize=999000"]) | ||||
# Reconnect to self.nodes[0] | # Reconnect to self.nodes[0] | ||||
self.nodes[0].add_p2p_connection(TestP2PConn()) | self.nodes[0].add_p2p_connection(TestP2PConn()) | ||||
# retrieve 20 blocks which should be enough to break the 1MB limit | # retrieve 20 blocks which should be enough to break the 1MB limit | ||||
getdata_request.inv = [CInv(2, big_new_block)] | getdata_request.inv = [CInv(2, big_new_block)] | ||||
for i in range(20): | for i in range(20): | ||||
Show All 15 Lines |