Changeset View
Changeset View
Standalone View
Standalone View
qa/rpc-tests/abc-ec.py
Show First 20 Lines • Show All 352 Lines • ▼ Show 20 Lines | def get_tests(self): | ||||
self.sync_all() | self.sync_all() | ||||
except AssertionError: | except AssertionError: | ||||
assert (True) | assert (True) | ||||
# Node 0 tip is a block bigger than 8mb and Node 1 tip is a not | # Node 0 tip is a block bigger than 8mb and Node 1 tip is a not | ||||
# excessive block | # excessive block | ||||
assert_equal(self.nodes[0].getbestblockhash(), big_block_hash) | assert_equal(self.nodes[0].getbestblockhash(), big_block_hash) | ||||
assert_equal(self.nodes[1].getbestblockhash(), node_1_last_hash) | assert_equal(self.nodes[1].getbestblockhash(), node_1_last_hash) | ||||
# Update the excessive size and resync | # The Block was stored but it's not the active chain | ||||
self.nodes[1].setexcessiveblock(self.excessive_block_size_16) | |||||
self.sync_all() | assert_equal(self.nodes[1].getblock( | ||||
assert_equal(self.nodes[0].getbestblockhash(), big_block_hash) | big_block_hash)["hash"], big_block_hash) | ||||
assert_equal(self.nodes[1].getbestblockhash(), big_block_hash) | assert_equal(self.nodes[1].getblock( | ||||
big_block_hash)["confirmations"], -1) | |||||
# TODO: make the node revalidate excessive blocks when the policy is changed | |||||
# self.nodes[1].setexcessiveblock(self.excessive_block_size_16) | |||||
# self.sync_all() | |||||
# assert_equal(self.nodes[0].getbestblockhash(), big_block_hash) | |||||
# assert_equal(self.nodes[1].getbestblockhash(), big_block_hash) | |||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
FullBlockTest().main() | FullBlockTest().main() |