Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc_rpc_excessiveblock.py
- This file was moved from test/functional/abc-rpc.py.
Show All 13 Lines | |||||
) | ) | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal, assert_raises_rpc_error | from test_framework.util import assert_equal, assert_raises_rpc_error | ||||
BLOCKSIZE_TOO_LOW = "Invalid parameter, excessiveblock must be larger than {}".format( | BLOCKSIZE_TOO_LOW = "Invalid parameter, excessiveblock must be larger than {}".format( | ||||
LEGACY_MAX_BLOCK_SIZE) | LEGACY_MAX_BLOCK_SIZE) | ||||
class ABC_RPC_Test (BitcoinTestFramework): | class ExcessiveBlockSizeRPCTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
self.tip = None | self.tip = None | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.extra_args = [['-whitelist=127.0.0.1']] | self.extra_args = [['-whitelist=127.0.0.1']] | ||||
def check_subversion(self, pattern_str): | def check_subversion(self, pattern_str): | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | def test_excessiveblock(self): | ||||
self.check_subversion(r"/Bitcoin ABC:.*\(EB13\.1; .*\)/") | self.check_subversion(r"/Bitcoin ABC:.*\(EB13\.1; .*\)/") | ||||
def run_test(self): | def run_test(self): | ||||
self.genesis_hash = int(self.nodes[0].getbestblockhash(), 16) | self.genesis_hash = int(self.nodes[0].getbestblockhash(), 16) | ||||
self.test_excessiveblock() | self.test_excessiveblock() | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
ABC_RPC_Test().main() | ExcessiveBlockSizeRPCTest().main() |