Improve the 'network_id' configuration option:

The 'network_id' option allows an administrator to specify to which
network they intend a server to connect. Servers can leverage this
information to optimize routing and prune automatically discovered
cross-network connections.

This commit will, if merged:

- add support for the devnet keyword, which corresponds to network ID #2;
- report the network ID, if one is configured, in server_info
This commit is contained in:
Nik Bougalis
2019-12-22 22:10:50 -08:00
parent a96dc2ecea
commit 607328e1a0
5 changed files with 27 additions and 3 deletions

View File

@@ -359,10 +359,15 @@ public:
return peerDisconnectsCharges_;
}
boost::optional<std::uint32_t>
networkID() const override
{
return networkID_;
}
Json::Value
crawlShards(bool pubKey, std::uint32_t hops) override;
/** Called when the last link from a peer chain is received.
@param id peer id that received the shard info.