Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_blockchain.py
Show All 17 Lines | |||||
Tests correspond to code in rpc/blockchain.cpp. | Tests correspond to code in rpc/blockchain.cpp. | ||||
""" | """ | ||||
from decimal import Decimal | from decimal import Decimal | ||||
import http.client | import http.client | ||||
import subprocess | import subprocess | ||||
from test_framework.test_framework import BitcoinTestFramework | |||||
from test_framework.util import ( | |||||
assert_equal, | |||||
assert_greater_than, | |||||
assert_greater_than_or_equal, | |||||
assert_raises, | |||||
assert_raises_rpc_error, | |||||
assert_is_hash_string, | |||||
assert_is_hex_string, | |||||
) | |||||
from test_framework.blocktools import ( | from test_framework.blocktools import ( | ||||
create_block, | create_block, | ||||
create_coinbase, | create_coinbase, | ||||
TIME_GENESIS_BLOCK, | TIME_GENESIS_BLOCK, | ||||
) | ) | ||||
from test_framework.messages import ( | from test_framework.messages import ( | ||||
msg_block, | msg_block, | ||||
) | ) | ||||
from test_framework.p2p import ( | from test_framework.p2p import P2PInterface | ||||
P2PInterface, | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import ( | |||||
assert_equal, | |||||
assert_greater_than, | |||||
assert_greater_than_or_equal, | |||||
assert_raises, | |||||
assert_raises_rpc_error, | |||||
assert_is_hex_string, | |||||
assert_is_hash_string, | |||||
) | ) | ||||
class BlockchainTest(BitcoinTestFramework): | class BlockchainTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
▲ Show 20 Lines • Show All 363 Lines • Show Last 20 Lines |