Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_blockchain.py
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | def _test_getblockchaininfo(self): | ||||
'chain', | 'chain', | ||||
'chainwork', | 'chainwork', | ||||
'difficulty', | 'difficulty', | ||||
'headers', | 'headers', | ||||
'mediantime', | 'mediantime', | ||||
'pruned', | 'pruned', | ||||
'softforks', | 'softforks', | ||||
'verificationprogress', | 'verificationprogress', | ||||
'warnings', | |||||
] | ] | ||||
res = self.nodes[0].getblockchaininfo() | res = self.nodes[0].getblockchaininfo() | ||||
# result should have pruneheight and default keys if pruning is enabled | # result should have pruneheight and default keys if pruning is enabled | ||||
assert_equal(sorted(res.keys()), sorted(['pruneheight'] + keys)) | assert_equal(sorted(res.keys()), sorted(['pruneheight'] + keys)) | ||||
# pruneheight should be greater or equal to 0 | # pruneheight should be greater or equal to 0 | ||||
assert res['pruneheight'] >= 0 | assert res['pruneheight'] >= 0 | ||||
self.restart_node(0, ['-stopatheight=207']) | self.restart_node(0, ['-stopatheight=207']) | ||||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |