Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_getchaintips.py
Show All 13 Lines | |||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
class GetChainTipsTest (BitcoinTestFramework): | class GetChainTipsTest (BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 4 | self.num_nodes = 4 | ||||
self.extra_args = [["-noparkdeepreorg"], ["-noparkdeepreorg"], [], []] | self.extra_args = [["-noparkdeepreorg"], ["-noparkdeepreorg"], [], []] | ||||
def skip_test_if_missing_module(self): | |||||
self.skip_if_no_wallet() | |||||
def run_test(self): | def run_test(self): | ||||
tips = self.nodes[0].getchaintips() | tips = self.nodes[0].getchaintips() | ||||
assert_equal(len(tips), 1) | assert_equal(len(tips), 1) | ||||
assert_equal(tips[0]['branchlen'], 0) | assert_equal(tips[0]['branchlen'], 0) | ||||
assert_equal(tips[0]['height'], 200) | assert_equal(tips[0]['height'], 200) | ||||
assert_equal(tips[0]['status'], 'active') | assert_equal(tips[0]['status'], 'active') | ||||
# Split the network and build two chains of different lengths. | # Split the network and build two chains of different lengths. | ||||
Show All 36 Lines |