Skip to content

Commit 01c8701

Browse files
committed
util: remove unwanted fields from bitcoin-cli -getinfo
In accordance with bitcoin#17314, Removing noisy fields from -getinfo. Fields removed: protocolversion, walletversion and keypoololdest. In addition to changing bitcoin-cli -getinfo, there is another change to test/functional/interface_bitcoin_cli.py. This change deletes tests that utilize removed -getinfo calls.
1 parent b90dad5 commit 01c8701

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/bitcoin-cli.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ class GetinfoRequestHandler: public BaseRequestHandler
256256
return batch[ID_BLOCKCHAININFO];
257257
}
258258
result.pushKV("version", batch[ID_NETWORKINFO]["result"]["version"]);
259-
result.pushKV("protocolversion", batch[ID_NETWORKINFO]["result"]["protocolversion"]);
260259
result.pushKV("blocks", batch[ID_BLOCKCHAININFO]["result"]["blocks"]);
261260
result.pushKV("headers", batch[ID_BLOCKCHAININFO]["result"]["headers"]);
262261
result.pushKV("verificationprogress", batch[ID_BLOCKCHAININFO]["result"]["verificationprogress"]);
@@ -266,9 +265,7 @@ class GetinfoRequestHandler: public BaseRequestHandler
266265
result.pushKV("difficulty", batch[ID_BLOCKCHAININFO]["result"]["difficulty"]);
267266
result.pushKV("chain", UniValue(batch[ID_BLOCKCHAININFO]["result"]["chain"]));
268267
if (!batch[ID_WALLETINFO]["result"].isNull()) {
269-
result.pushKV("walletversion", batch[ID_WALLETINFO]["result"]["walletversion"]);
270268
result.pushKV("balance", batch[ID_WALLETINFO]["result"]["balance"]);
271-
result.pushKV("keypoololdest", batch[ID_WALLETINFO]["result"]["keypoololdest"]);
272269
result.pushKV("keypoolsize", batch[ID_WALLETINFO]["result"]["keypoolsize"]);
273270
if (!batch[ID_WALLETINFO]["result"]["unlocked_until"].isNull()) {
274271
result.pushKV("unlocked_until", batch[ID_WALLETINFO]["result"]["unlocked_until"]);

test/functional/interface_bitcoin_cli.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,14 @@ def run_test(self):
5656
blockchain_info = self.nodes[0].getblockchaininfo()
5757

5858
assert_equal(cli_get_info['version'], network_info['version'])
59-
assert_equal(cli_get_info['protocolversion'], network_info['protocolversion'])
6059
assert_equal(cli_get_info['blocks'], blockchain_info['blocks'])
6160
assert_equal(cli_get_info['timeoffset'], network_info['timeoffset'])
6261
assert_equal(cli_get_info['connections'], network_info['connections'])
6362
assert_equal(cli_get_info['proxy'], network_info['networks'][0]['proxy'])
6463
assert_equal(cli_get_info['difficulty'], blockchain_info['difficulty'])
6564
assert_equal(cli_get_info['chain'], blockchain_info['chain'])
6665
if self.is_wallet_compiled():
67-
assert_equal(cli_get_info['walletversion'], wallet_info['walletversion'])
6866
assert_equal(cli_get_info['balance'], wallet_info['balance'])
69-
assert_equal(cli_get_info['keypoololdest'], wallet_info['keypoololdest'])
7067
assert_equal(cli_get_info['keypoolsize'], wallet_info['keypoolsize'])
7168
assert_equal(cli_get_info['paytxfee'], wallet_info['paytxfee'])
7269
assert_equal(cli_get_info['relayfee'], network_info['relayfee'])

0 commit comments

Comments
 (0)