From 4fbb098daa349a663015426d1210f1b59d0478c4 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 23 Oct 2014 16:46:09 -0700 Subject: Testnet work... getting there! --- testnet/SimNetSocketManager.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'testnet/SimNetSocketManager.hpp') diff --git a/testnet/SimNetSocketManager.hpp b/testnet/SimNetSocketManager.hpp index 031cbd0c..69f49556 100644 --- a/testnet/SimNetSocketManager.hpp +++ b/testnet/SimNetSocketManager.hpp @@ -32,7 +32,7 @@ #include #include -#include "Constants.hpp" +#include "../node/Constants.hpp" #include "../node/SocketManager.hpp" #include "../node/Mutex.hpp" #include "../node/Condition.hpp" @@ -76,7 +76,10 @@ public: inline TransferStats stats(const InetAddress &peer) const { Mutex::Lock _l(_stats_m); - return _stats[peer]; + std::map< InetAddress,TransferStats >::const_iterator s(_stats.find(peer)); + if (s == _stats.end()) + return TransferStats(); + return s->second; } /** -- cgit v1.2.3