Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc_mining_basic.py
Show All 33 Lines | def set_test_params(self): | ||||
'-axionactivationtime={}'.format(AXION_ACTIVATION_TIME), | '-axionactivationtime={}'.format(AXION_ACTIVATION_TIME), | ||||
], [ | ], [ | ||||
'-enableminerfund', | '-enableminerfund', | ||||
'-usecashaddr=0', | '-usecashaddr=0', | ||||
'-axionactivationtime={}'.format(AXION_ACTIVATION_TIME), | '-axionactivationtime={}'.format(AXION_ACTIVATION_TIME), | ||||
]] | ]] | ||||
def run_for_node(self, node, expectedMinerFundAddress): | def run_for_node(self, node, expectedMinerFundAddress): | ||||
# Rewind any previously mined blocks so axion can be activated again | |||||
if node.getblockcount() > 200: | |||||
node.invalidateblock(node.getblockhash(201)) | |||||
address = node.get_deterministic_priv_key().address | address = node.get_deterministic_priv_key().address | ||||
# Assert the results of getblocktemplate have expected values. Keys not | # Assert the results of getblocktemplate have expected values. Keys not | ||||
# in 'expected' are not checked. | # in 'expected' are not checked. | ||||
def assert_getblocktemplate(expected): | def assert_getblocktemplate(expected): | ||||
# Always test these values in addition to those passed in | # Always test these values in addition to those passed in | ||||
expected = {**expected, **{ | expected = {**expected, **{ | ||||
'sigoplimit': DEFAULT_MAX_BLOCK_SIZE // BLOCK_MAXBYTES_MAXSIGCHECKS_RATIO, | 'sigoplimit': DEFAULT_MAX_BLOCK_SIZE // BLOCK_MAXBYTES_MAXSIGCHECKS_RATIO, | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |