HomePhabricator

refactor: enable -netinfo to add future networks (i2p, cjdns)

Description

refactor: enable -netinfo to add future networks (i2p, cjdns)

Summary:
After this commit, a new network may be added by changing 4 lines:

  • increment the value of m_networks_size
  • add the network name to m_networks
  • add the network name to this line: result += " ipv4 ipv6 onion total block-relay\n";
  • add "counts.at(i).at(<m_networks pos>)" to this line: result += strprintf("%-5s %5i %5i %5i %5i %5i\n...

This is a backport of core#20002 [5/5]
https://github.com/bitcoin/bitcoin/pull/20002/commits/6272604bef3b409455b010d134b4b62c8f6ff49f

Depends on D10505

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10506

Details

Provenance
Jon Atack <jon@atack.com>Authored on Oct 2 2020, 20:19
PiRKCommitted on Nov 24 2021, 08:42
PiRKPushed on Nov 24 2021, 08:42
Reviewer
Restricted Project
Differential Revision
D10506: refactor: enable -netinfo to add future networks (i2p, cjdns)
Parents
rABC47738f027e58: refactor: promote some -netinfo localvars to class members
Branches
Unknown
Tags
Unknown