0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-04 10:07:27 -05:00
bitcoin-bitcoin-core/src/rpc
Wladimir J. van der Laan 23d3ae7acc
Merge #19405: rpc, cli: add network in/out connections to getnetworkinfo and -getinfo
581b343d5b Add in/out connections to cli -getinfo (Jon Atack)
d9cc13e88d UNIX_EPOCH_TIME fixup in rpc getnettotals (Jon Atack)
1ab49b81cf Add in/out connections to rpc getnetworkinfo (Jon Atack)

Pull request description:

  This is basic info that is present in the GUI that I've been wishing to have exposed via the RPC and CLI without needing a bash workaround or script. For human users it would also be useful to have it in `-getinfo`.

  `bitcoin-cli getnetworkinfo`
  ```
    "connections": 15,
    "connections_in": 6,
    "connections_out": 9,
  ```

  `bitcoin-cli -getinfo`
  ```
    "connections": {
      "in": 6,
      "out": 9,
      "total": 15
    },
  ```

  Update the tests, RPC help, and release notes for the changes. Also fixup the `getnettotals` timemillis help while touching `rpc/net.cpp`.

  -----

  Reviewers can manually test this PR by [building from source](https://jonatack.github.io/articles/how-to-compile-bitcoin-core-and-run-the-tests), launching bitcoind, and then running `bitcoin-cli -getinfo`, `bitcoin-cli getnetworkinfo`, `bitcoin-cli help getnetworkinfo`, and `bitcoin-cli help getnettotals` (for the UNIX epoch time change).

ACKs for top commit:
  eriknylund:
    > tACK [581b343](581b343d5b) on master at [a0a422c](a0a422c34c), ran unit & functional tests and and confirmed changes on an existing datadir ✌️
  benthecarman:
    tACK `581b343`
  willcl-ark:
    tACK for 581b343d5b, this time rebased onto master at 862fde88be.
  shesek:
    tACK `581b343`. This provides what I needed, thanks!
  n-thumann:
    tACK 581b343 on master at a0a422c, ran unit & functional tests and and confirmed changes on an existing datadir ✌️

Tree-SHA512: 08dd3ac8fefae401bd8253ff3ac027603c528eeccba53cedcb127771316173a7052fce44af8fa33ac98ebc4cf2a2b11cdefd949995d55e9b9a5942b876d00dc5
2020-09-04 15:09:37 +02:00
..
blockchain.cpp docs: Correct description for getblockstats's txs field 2020-08-21 17:41:02 +03:00
blockchain.h validation: Make ProcessNewBlock*() members of ChainstateManager 2020-05-21 09:56:16 -04:00
client.cpp Add loadwallet and createwallet RPC load_on_startup options 2020-08-13 09:44:48 -04:00
client.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
mining.cpp Merge #19717: rpc: Assert that RPCArg names are equal to CRPCCommand ones (mining,zmq,rpcdump) 2020-08-31 17:43:35 +02:00
mining.h rpc: create rpc/mining.h, hoist default max tries values to constant 2020-06-01 15:08:36 +02:00
misc.cpp rpc: Add getindexinfo RPC 2020-08-16 11:15:49 +02:00
net.cpp Merge #19405: rpc, cli: add network in/out connections to getnetworkinfo and -getinfo 2020-09-04 15:09:37 +02:00
protocol.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
rawtransaction.cpp util: make EncodeBase64 consume Spans 2020-08-25 18:52:57 +02:00
rawtransaction_util.cpp refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o) 2020-06-24 18:41:45 +02:00
rawtransaction_util.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
register.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
request.cpp refactor: Make HexStr take a span 2020-08-06 19:41:43 +02:00
request.h Remove g_rpc_chain global 2020-05-28 02:13:19 -04:00
server.cpp rpc: Remove unused return type from appendCommand 2020-08-14 12:37:06 +02:00
server.h rpc: Remove unused return type from appendCommand 2020-08-14 12:37:06 +02:00
util.cpp Merge #19528: rpc: Assert that RPCArg names are equal to CRPCCommand ones (misc) 2020-08-14 09:26:37 +02:00
util.h Merge #19386: rpc: Assert that RPCArg names are equal to CRPCCommand ones (server) 2020-07-15 19:20:21 +02:00