Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-get-invalid-block.py
Show All 15 Lines | |||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
class GetInvalidBlockTest(BitcoinTestFramework): | class GetInvalidBlockTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
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] | ||||
node.add_p2p_connection(P2PInterface()) | node.add_p2p_connection(P2PInterface()) | ||||
chaintip = node.getbestblockhash() | chaintip = node.getbestblockhash() | ||||
# Mine some blocks and invalidate them | # Mine some blocks and invalidate them | ||||
blocks = node.generate(nblocks=3) | blocks = node.generate(nblocks=3) | ||||
assert_equal(blocks[-1], node.getbestblockhash()) | assert_equal(blocks[-1], node.getbestblockhash()) | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |