diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-28 15:33:10 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-28 15:33:10 -0700 |
| commit | 4dec598fb888e24e663c8e32c499b82b74086534 (patch) | |
| tree | 8bbe21c10747b690b2c7cfaf36b1032aad969986 /testnet.cpp | |
| parent | 3e948fcd9327d85d3a55e35156aa5d56e6793d80 (diff) | |
| download | infinitytier-4dec598fb888e24e663c8e32c499b82b74086534.tar.gz infinitytier-4dec598fb888e24e663c8e32c499b82b74086534.zip | |
Make multicast gather slightly more aggressive, and add total to list command in testnet.
Diffstat (limited to 'testnet.cpp')
| -rw-r--r-- | testnet.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testnet.cpp b/testnet.cpp index 0d0a7be4..8af203ac 100644 --- a/testnet.cpp +++ b/testnet.cpp @@ -277,6 +277,7 @@ static void doMKN(const std::vector<std::string> &cmd) static void doList(const std::vector<std::string> &cmd) { + unsigned int peers = 0,supernodes = 0; ZT1_Node_Status status; for(std::map< Address,SimNode * >::iterator n(nodes.begin());n!=nodes.end();++n) { n->second->node.status(&status); @@ -287,8 +288,12 @@ static void doList(const std::vector<std::string> &cmd) (status.online ? "ONLINE" : "OFFLINE"), status.knownPeers, status.directlyConnectedPeers); + if (n->second->supernode) + ++supernodes; + else ++peers; } else printf("%s ? INITIALIZING (0 peers, 0 direct links)"ZT_EOL_S,n->first.toString().c_str()); } + printf("---------- %u regular peers, %u supernodes"ZT_EOL_S,peers,supernodes); } static void doJoin(const std::vector<std::string> &cmd) |
