diff --git a/node/Meter.hpp b/node/Meter.hpp index 58def766a..b02699509 100644 --- a/node/Meter.hpp +++ b/node/Meter.hpp @@ -53,34 +53,40 @@ public: { _lock.lock(); const int64_t since = now - _ts; - if (since >= 1000) { + if (since >= ZT_METER_HISTORY_TICK_DURATION) { _ts = now; for(int i=1;i= ZT_METER_HISTORY_TICK_DURATION) { + r += (double)_count / ((double)since / 1000.0); + n += 1.0; + } + for(int i=0;isibling = true; siblings.push_back(rp); + peersByIdentity[id] = rp; + peersByVirtAddr[id.address()].insert(rp); + peersByPhysAddr[ip].insert(rp); } else { printf("FATAL: invalid JSON while parsing siblings section in config file: sibling entry is not a JSON object" ZT_EOL_S); return 1;