Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mining_basic.py
Show All 24 Lines | from test_framework.util import ( | ||||
assert_raises_rpc_error, | assert_raises_rpc_error, | ||||
) | ) | ||||
def assert_template(node, block, expect, rehash=True): | def assert_template(node, block, expect, rehash=True): | ||||
if rehash: | if rehash: | ||||
block.hashMerkleRoot = block.calc_merkle_root() | block.hashMerkleRoot = block.calc_merkle_root() | ||||
rsp = node.getblocktemplate( | rsp = node.getblocktemplate( | ||||
{'data': block.serialize().hex(), 'mode': 'proposal'}) | template_request={ | ||||
'data': block.serialize().hex(), | |||||
'mode': 'proposal'}) | |||||
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 | ||||
▲ Show 20 Lines • Show All 214 Lines • Show Last 20 Lines |