From 82aa3f59d6f60995719cc3d857b4fa3bb33df19d Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 15 Dec 2015 10:30:40 -0800 Subject: Fix bug in ECHO handling (OK was invalid!), and use ECHO on newer peers for path confirmation. Also get rid of path confirmation circuit breaker since this causes issues with some peers and should be done more intelligently anyway. --- node/Peer.hpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'node/Peer.hpp') diff --git a/node/Peer.hpp b/node/Peer.hpp index 5816db69..069d44c0 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -454,7 +454,7 @@ public: const unsigned int recSizePos = b.size(); b.addSize(4); // space for uint32_t field length - b.append((uint16_t)0); // version of serialized Peer data + b.append((uint16_t)1); // version of serialized Peer data _id.serialize(b,false); @@ -463,7 +463,6 @@ public: b.append((uint64_t)_lastUnicastFrame); b.append((uint64_t)_lastMulticastFrame); b.append((uint64_t)_lastAnnouncedTo); - b.append((uint64_t)_lastPathConfirmationSent); b.append((uint64_t)_lastDirectPathPushSent); b.append((uint64_t)_lastDirectPathPushReceive); b.append((uint64_t)_lastPathSort); @@ -518,7 +517,7 @@ public: const unsigned int recSize = b.template at(p); p += 4; if ((p + recSize) > b.size()) return SharedPtr(); // size invalid - if (b.template at(p) != 0) + if (b.template at(p) != 1) return SharedPtr(); // version mismatch p += 2; @@ -534,7 +533,6 @@ public: np->_lastUnicastFrame = b.template at(p); p += 8; np->_lastMulticastFrame = b.template at(p); p += 8; np->_lastAnnouncedTo = b.template at(p); p += 8; - np->_lastPathConfirmationSent = b.template at(p); p += 8; np->_lastDirectPathPushSent = b.template at(p); p += 8; np->_lastDirectPathPushReceive = b.template at(p); p += 8; np->_lastPathSort = b.template at(p); p += 8; @@ -585,7 +583,6 @@ private: uint64_t _lastUnicastFrame; uint64_t _lastMulticastFrame; uint64_t _lastAnnouncedTo; - uint64_t _lastPathConfirmationSent; uint64_t _lastDirectPathPushSent; uint64_t _lastDirectPathPushReceive; uint64_t _lastPathSort; -- cgit v1.2.3