Skip to content

Commit 5aee0e2

Browse files
committed
Merge bitcoin#17650: util: remove unwanted fields from bitcoin-cli -getinfo
01c8701 util: remove unwanted fields from bitcoin-cli -getinfo (malevolent) Pull request description: Removed the following fields from -getinfo: protocolversion, walletversion and keypoololdest. This change closes bitcoin#17314 . ACKs for top commit: laanwj: ACK 01c8701 achow101: ACK 01c8701 practicalswift: ACK 01c8701 -- diff looks correct Tree-SHA512: c98f2e8a3fee04d46766f70cb88f4e49e892a4424eff8940a7d48e9e808597b702427225788f984f5c3641591fd8d86acee56774afde1d57a4259c31d971ea08
2 parents fee01bb + 01c8701 commit 5aee0e2

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
@@ -59,17 +59,14 @@ def run_test(self):
5959
blockchain_info = self.nodes[0].getblockchaininfo()
6060

6161
assert_equal(cli_get_info['version'], network_info['version'])
62-
assert_equal(cli_get_info['protocolversion'], network_info['protocolversion'])
6362
assert_equal(cli_get_info['blocks'], blockchain_info['blocks'])
6463
assert_equal(cli_get_info['timeoffset'], network_info['timeoffset'])
6564
assert_equal(cli_get_info['connections'], network_info['connections'])
6665
assert_equal(cli_get_info['proxy'], network_info['networks'][0]['proxy'])
6766
assert_equal(cli_get_info['difficulty'], blockchain_info['difficulty'])
6867
assert_equal(cli_get_info['chain'], blockchain_info['chain'])
6968
if self.is_wallet_compiled():
70-
assert_equal(cli_get_info['walletversion'], wallet_info['walletversion'])
7169
assert_equal(cli_get_info['balance'], wallet_info['balance'])
72-
assert_equal(cli_get_info['keypoololdest'], wallet_info['keypoololdest'])
7370
assert_equal(cli_get_info['keypoolsize'], wallet_info['keypoolsize'])
7471
assert_equal(cli_get_info['paytxfee'], wallet_info['paytxfee'])
7572
assert_equal(cli_get_info['relayfee'], network_info['relayfee'])

0 commit comments

Comments
 (0)