Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mining_basic.py
Show All 33 Lines | def assert_template(node, block, expect, rehash=True): | ||||
assert_equal(rsp, expect) | assert_equal(rsp, expect) | ||||
class MiningTest(BitcoinTestFramework): | class MiningTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
self.setup_clean_chain = False | self.setup_clean_chain = False | ||||
def skip_test_if_missing_module(self): | |||||
self.skip_if_no_wallet() | |||||
def run_test(self): | def run_test(self): | ||||
node = self.nodes[0] | node = self.nodes[0] | ||||
def assert_submitblock(block, result_str_1, result_str_2=None): | def assert_submitblock(block, result_str_1, result_str_2=None): | ||||
block.solve() | block.solve() | ||||
result_str_2 = result_str_2 or 'duplicate-invalid' | result_str_2 = result_str_2 or 'duplicate-invalid' | ||||
assert_equal(result_str_1, node.submitblock( | assert_equal(result_str_1, node.submitblock( | ||||
hexdata=block.serialize().hex())) | hexdata=block.serialize().hex())) | ||||
▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines |