From 34a64f30de711a420ff0fd51cd3ddf2edc282122 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 9 Mar 2022 09:13:26 -0500 Subject: [PATCH] Bump the peer cache serialization version due to path changes, will cause peers to be re-learned. Technically the peer cache is optional anyway so it's not going to break anything and should guard against weird issues due to path learning changes on restart. --- node/Peer.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/Peer.hpp b/node/Peer.hpp index 3bfe31950..11e084baf 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -438,7 +438,7 @@ public: template inline void serializeForCache(Buffer &b) const { - b.append((uint8_t)1); + b.append((uint8_t)2); _id.serialize(b); @@ -466,7 +466,7 @@ public: { try { unsigned int ptr = 0; - if (b[ptr++] != 1) + if (b[ptr++] != 2) return SharedPtr(); Identity id;