Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_blockchain.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2016 The Bitcoin Core developers | # Copyright (c) 2014-2016 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 RPCs related to blockchainstate. | """Test RPCs related to blockchainstate. | ||||
Test the following RPCs: | Test the following RPCs: | ||||
- getblockchaininfo | |||||
- gettxoutsetinfo | - gettxoutsetinfo | ||||
- getdifficulty | - getdifficulty | ||||
- getbestblockhash | - getbestblockhash | ||||
- getblockhash | - getblockhash | ||||
- getblockheader | - getblockheader | ||||
- getchaintxstats | - getchaintxstats | ||||
- getnetworkhashps | - getnetworkhashps | ||||
- verifychain | - verifychain | ||||
Show All 39 Lines | def _test_getblockchaininfo(self): | ||||
keys = [ | keys = [ | ||||
'bestblockhash', | 'bestblockhash', | ||||
'blocks', | 'blocks', | ||||
'chain', | 'chain', | ||||
'chainwork', | 'chainwork', | ||||
'difficulty', | 'difficulty', | ||||
'headers', | 'headers', | ||||
'initialblockdownload', | |||||
'mediantime', | 'mediantime', | ||||
'pruned', | 'pruned', | ||||
'size_on_disk', | 'size_on_disk', | ||||
'softforks', | 'softforks', | ||||
'verificationprogress', | 'verificationprogress', | ||||
'warnings', | 'warnings', | ||||
] | ] | ||||
res = self.nodes[0].getblockchaininfo() | res = self.nodes[0].getblockchaininfo() | ||||
▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines |