From 4d0eef45f7064c87d7f01c6d5ecdf0233f5d04dc Mon Sep 17 00:00:00 2001 From: Doug Hoyte Date: Mon, 18 Sep 2023 11:57:35 -0400 Subject: [PATCH] use negentropy protocol 0 --- external/negentropy | 2 +- src/apps/mesh/cmd_sync.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/external/negentropy b/external/negentropy index 540753c..bdd421c 160000 --- a/external/negentropy +++ b/external/negentropy @@ -1 +1 @@ -Subproject commit 540753c66ac7b4fcd3b255c9607e3f558a49cddd +Subproject commit bdd421c1fbf8ca6d4404597411674f09eb578eb5 diff --git a/src/apps/mesh/cmd_sync.cpp b/src/apps/mesh/cmd_sync.cpp index 9187905..cb63284 100644 --- a/src/apps/mesh/cmd_sync.cpp +++ b/src/apps/mesh/cmd_sync.cpp @@ -134,7 +134,13 @@ void cmd_sync(const std::vector &subArgs) { if (!doUp) have.clear(); if (!doDown) need.clear(); - if (neMsg.size() == 0) { + if (neMsg) { + ws.send(tao::json::to_string(tao::json::value::array({ + "NEG-MSG", + "N", + to_hex(*neMsg), + }))); + } else { syncDone = true; LI << "Set reconcile complete. Have " << totalHaves << " need " << totalNeeds; @@ -142,12 +148,6 @@ void cmd_sync(const std::vector &subArgs) { "NEG-CLOSE", "N", }))); - } else { - ws.send(tao::json::to_string(tao::json::value::array({ - "NEG-MSG", - "N", - to_hex(neMsg), - }))); } } else if (msg.at(0) == "OK") { inFlightUp--;