Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc_p2p_avalanche_voting.py
Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
return node.getbestblockhash() == fork_tip | return node.getbestblockhash() == fork_tip | ||||
# Because everybody answers no, the node will park that block. | # Because everybody answers no, the node will park that block. | ||||
wait_until(has_parked_new_tip, timeout=15) | wait_until(has_parked_new_tip, timeout=15) | ||||
assert_equal(node.getbestblockhash(), fork_tip) | assert_equal(node.getbestblockhash(), fork_tip) | ||||
self.log.info( | self.log.info( | ||||
"Check the node is discouraging unexpected avaresponses.") | "Check the node is discouraging unexpected avaresponses.") | ||||
with self.nodes[0].assert_debug_log( | with node.assert_debug_log( | ||||
['Misbehaving', 'peer=1 (0 -> 2): unexpected-ava-response']): | ['Misbehaving', 'peer=1 (0 -> 2): unexpected-ava-response']): | ||||
# unknown voting round | # unknown voting round | ||||
poll_node.send_avaresponse( | poll_node.send_avaresponse( | ||||
round=2**32 - 1, votes=[], privkey=privkey) | round=2**32 - 1, votes=[], privkey=privkey) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
AvalancheTest().main() | AvalancheTest().main() |