summaryrefslogtreecommitdiff
path: root/node/Topology.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-10-28 14:29:08 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-10-28 14:29:08 -0700
commit68d6d3c4ff4d3921408f7d9bab3e31e0e028a871 (patch)
tree00fe28018eeea7c76645cebfc0570f68757212d0 /node/Topology.cpp
parent4c24e0cfb0bb9b61a4e19ac81b89dc1cbce6ea99 (diff)
downloadinfinitytier-68d6d3c4ff4d3921408f7d9bab3e31e0e028a871.tar.gz
infinitytier-68d6d3c4ff4d3921408f7d9bab3e31e0e028a871.zip
Fix bug in peer count.
Diffstat (limited to 'node/Topology.cpp')
-rw-r--r--node/Topology.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Topology.cpp b/node/Topology.cpp
index 09668ef5..9027eff1 100644
--- a/node/Topology.cpp
+++ b/node/Topology.cpp
@@ -308,7 +308,7 @@ void Topology::clean(uint64_t now)
}
}
-unsigned long Topology::countAlive() const
+unsigned long Topology::countActive() const
{
const uint64_t now = RR->node->now();
unsigned long cnt = 0;
@@ -317,7 +317,7 @@ unsigned long Topology::countAlive() const
Address *a = (Address *)0;
SharedPtr<Peer> *p = (SharedPtr<Peer> *)0;
while (i.next(a,p)) {
- if ((*p)->alive(now))
+ if ((*p)->hasActiveDirectPath(now))
++cnt;
}
return cnt;