Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mining_basic.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2019 The Bitcoin Core developers | # Copyright (c) 2014-2019 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Test mining RPCs | """Test mining RPCs | ||||
- getmininginfo | - getmininginfo | ||||
- getblocktemplate proposal mode | - getblocktemplate proposal mode | ||||
- submitblock""" | - submitblock""" | ||||
import copy | import copy | ||||
from decimal import Decimal | from decimal import Decimal | ||||
from test_framework.blocktools import ( | from test_framework.blocktools import TIME_GENESIS_BLOCK, create_coinbase | ||||
create_coinbase, | from test_framework.messages import BLOCK_HEADER_SIZE, CBlock, CBlockHeader | ||||
TIME_GENESIS_BLOCK, | from test_framework.p2p import P2PDataStore | ||||
) | |||||
from test_framework.messages import ( | |||||
CBlock, | |||||
CBlockHeader, | |||||
BLOCK_HEADER_SIZE, | |||||
) | |||||
from test_framework.p2p import ( | |||||
P2PDataStore, | |||||
) | |||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import ( | from test_framework.util import ( | ||||
assert_equal, | assert_equal, | ||||
assert_raises_rpc_error, | assert_raises_rpc_error, | ||||
connect_nodes, | connect_nodes, | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines |