Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p-acceptblock.py
Show First 20 Lines • Show All 258 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
test_node.sync_with_ping() | test_node.sync_with_ping() | ||||
assert_equal(self.nodes[0].getblockcount(), 290) | assert_equal(self.nodes[0].getblockcount(), 290) | ||||
self.log.info( | self.log.info( | ||||
"Successfully reorged to longer chain from non-whitelisted peer") | "Successfully reorged to longer chain from non-whitelisted peer") | ||||
[c.disconnect_node() for c in connections] | [c.disconnect_node() for c in connections] | ||||
# 8. Connect node2 to node0 and ensure it is able to sync | # 8. Connect node2 to node0 and ensure it is able to sync | ||||
connect_nodes(self.nodes[0], 2) | connect_nodes(self.nodes[0], self.nodes[2]) | ||||
sync_blocks([self.nodes[0], self.nodes[2]]) | sync_blocks([self.nodes[0], self.nodes[2]]) | ||||
self.log.info("Successfully synced nodes 2 and 0") | self.log.info("Successfully synced nodes 2 and 0") | ||||
[c.disconnect_node() for c in connections] | [c.disconnect_node() for c in connections] | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
AcceptBlockTest().main() | AcceptBlockTest().main() |