use negentropy protocol 0

This commit is contained in:
Doug Hoyte
2023-09-18 11:57:35 -04:00
parent 7da862eb91
commit 4d0eef45f7
2 changed files with 8 additions and 8 deletions

View File

@ -134,7 +134,13 @@ void cmd_sync(const std::vector<std::string> &subArgs) {
if (!doUp) have.clear(); if (!doUp) have.clear();
if (!doDown) need.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; syncDone = true;
LI << "Set reconcile complete. Have " << totalHaves << " need " << totalNeeds; LI << "Set reconcile complete. Have " << totalHaves << " need " << totalNeeds;
@ -142,12 +148,6 @@ void cmd_sync(const std::vector<std::string> &subArgs) {
"NEG-CLOSE", "NEG-CLOSE",
"N", "N",
}))); })));
} else {
ws.send(tao::json::to_string(tao::json::value::array({
"NEG-MSG",
"N",
to_hex(neMsg),
})));
} }
} else if (msg.at(0) == "OK") { } else if (msg.at(0) == "OK") {
inFlightUp--; inFlightUp--;