diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-12-15 10:30:40 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-12-15 10:30:40 -0800 |
| commit | 82aa3f59d6f60995719cc3d857b4fa3bb33df19d (patch) | |
| tree | 8e11c5e65697fcb0309d5d36319f50aa3ec67fe6 /node/Peer.hpp | |
| parent | 04d6b037334ae2da8523a1c83d9b02c89e9f1da1 (diff) | |
| download | infinitytier-82aa3f59d6f60995719cc3d857b4fa3bb33df19d.tar.gz infinitytier-82aa3f59d6f60995719cc3d857b4fa3bb33df19d.zip | |
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.
Diffstat (limited to 'node/Peer.hpp')
| -rw-r--r-- | node/Peer.hpp | 7 |
1 files changed, 2 insertions, 5 deletions
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<uint32_t>(p); p += 4; if ((p + recSize) > b.size()) return SharedPtr<Peer>(); // size invalid - if (b.template at<uint16_t>(p) != 0) + if (b.template at<uint16_t>(p) != 1) return SharedPtr<Peer>(); // version mismatch p += 2; @@ -534,7 +533,6 @@ public: np->_lastUnicastFrame = b.template at<uint64_t>(p); p += 8; np->_lastMulticastFrame = b.template at<uint64_t>(p); p += 8; np->_lastAnnouncedTo = b.template at<uint64_t>(p); p += 8; - np->_lastPathConfirmationSent = b.template at<uint64_t>(p); p += 8; np->_lastDirectPathPushSent = b.template at<uint64_t>(p); p += 8; np->_lastDirectPathPushReceive = b.template at<uint64_t>(p); p += 8; np->_lastPathSort = b.template at<uint64_t>(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; |
