dash/src/rpc
Wladimir J. van der Laan 6b0d660e74 Merge #20120: net, rpc, test, bugfix: update GetNetworkName, GetNetworksInfo, regression tests
7b5bd3102e06f7ff34b5d0f1d45a005560f265a5 test: add getnetworkinfo network name regression tests (Jon Atack)
9a75e1e5697476058b56cd8014a36de31bfecd4c rpc: update GetNetworksInfo() to not return unsupported networks (Jon Atack)
ba8997fb2eda73603ce457bfec668cb7e0acbc89 net: update GetNetworkName() with all enum Network cases (Jon Atack)

Pull request description:

  Following up on the BIP155 addrv2 changes, and starting with 7be6ff6 in #19845, RPC getnetworkinfo began returning networks with empty names.

  <details><summary><code>getnetworkinfo</code> on current master</summary><p>

  ```
    "networks": [
      {
        "name": "ipv4",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "ipv6",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "onion",
        "limited": false,
        "reachable": true,
        "proxy": "127.0.0.1:9050",
        "proxy_randomize_credentials": true
      },
      {
        "name": "",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      }
    ],
  ```
  </p></details>

  <details><summary><code>getnetworkinfo</code> on this branch</summary><p>

  ```
    "networks": [
      {
        "name": "ipv4",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "ipv6",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "onion",
        "limited": false,
        "reachable": true,
        "proxy": "127.0.0.1:9050",
        "proxy_randomize_credentials": true
      }
    ],
  ```
  </p></details>

  This patch:
  - updates `GetNetworkName()` to the current Network enum
  - updates `getNetworksInfo()` to ignore as-yet unsupported networks
  - adds regression tests

ACKs for top commit:
  hebasto:
    re-ACK 7b5bd3102e06f7ff34b5d0f1d45a005560f265a5
  vasild:
    ACK 7b5bd3102

Tree-SHA512: 8f12363eb430e6f45e59e3b1d69c2f2eb5ead254ce7a67547d116c3b70138d763157335a3c85b51f684a3b3b502c6aace4f6fa60ac3b988cf7a9475a7423c4d7
2023-05-31 10:52:02 -05:00
..
blockchain.cpp Merge #17399: validation: Templatize ValidationState instead of subclassing 2023-05-24 12:43:57 -05:00
blockchain.h merge bitcoin#18766: disable fee estimation in blocksonly mode (by removing the fee estimates global) 2023-02-28 00:11:11 +03:00
client.cpp merge bitcoin#19133: add bitcoin-cli -generate command 2023-04-17 08:30:49 +00:00
client.h
coinjoin.cpp merge bitcoin#18766: disable fee estimation in blocksonly mode (by removing the fee estimates global) 2023-02-28 00:11:11 +03:00
evo.cpp Merge #17399: validation: Templatize ValidationState instead of subclassing 2023-05-24 12:43:57 -05:00
governance.cpp chore: harden dip 20 and 24 activation (#5344) 2023-05-17 14:11:33 +03:00
masternode.cpp fix: reviewing TODOes at v19 (#5303) 2023-04-09 00:11:22 -05:00
mining.cpp Merge #17399: validation: Templatize ValidationState instead of subclassing 2023-05-24 12:43:57 -05:00
mining.h merge bitcoin#19133: add bitcoin-cli -generate command 2023-04-17 08:30:49 +00:00
misc.cpp fix: reviewing TODOes at v19 (#5303) 2023-04-09 00:11:22 -05:00
net.cpp Merge #20120: net, rpc, test, bugfix: update GetNetworkName, GetNetworksInfo, regression tests 2023-05-31 10:52:02 -05:00
protocol.h merge bitcoin#17407: Add reference to mempool in NodeContext 2022-04-20 00:22:36 +05:30
quorums.cpp feat!: Insertion of best CL signature in CbTx (#5262) 2023-05-08 22:34:26 -05:00
rawtransaction_util.cpp Merge #16250: signrawtransactionwithkey: report error when missing redeemScript/witnessScript 2023-03-29 21:01:56 +03:00
rawtransaction_util.h Merge #17945: doc: Fix doxygen errors 2022-10-17 15:41:14 -05:00
rawtransaction.cpp Merge #17399: validation: Templatize ValidationState instead of subclassing 2023-05-24 12:43:57 -05:00
register.h
request.cpp merge bitcoin#18594: display multiwallet balances in -getinfo 2023-04-17 08:30:49 +00:00
request.h merge bitcoin#18594: display multiwallet balances in -getinfo 2023-04-17 08:30:49 +00:00
server.cpp Merge #19399: refactor: Replace RecursiveMutex with Mutex in rpc/server.cpp 2023-05-31 10:52:02 -05:00
server.h merge bitcoin#19056: Make gettxoutsetinfo/GetUTXOStats interruptible 2022-05-23 10:39:43 +05:30
util.cpp partial bitcoin#17938: Disallow automatic conversion between disparate hash types 2023-04-15 12:12:30 -05:00
util.h Merge #17261: Make ScriptPubKeyMan an actual interface and the wallet to have multiple 2023-03-19 11:08:31 -05:00