From 0eecb8a8a07120c8f0dde05fe1f1c054f0587c47 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Wed, 26 Apr 2023 17:07:22 -0700 Subject: [PATCH] fix bond post logic --- service/OneService.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/OneService.cpp b/service/OneService.cpp index a36d6b428..67a39defc 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1632,15 +1632,17 @@ public: std::vector moons(_node->moons()); const uint64_t id = Utils::hexStrToU64(input.str().c_str()); + bool found = false; auto out = json::object(); for(std::vector::const_iterator m(moons.begin());m!=moons.end();++m) { if (m->id() == id) { _moonToJson(out,*m); + found = true; break; } } - if (seed != 0) { + if (!found && seed != 0) { char tmp[64]; OSUtils::ztsnprintf(tmp,sizeof(tmp),"%.16llx",id); out["id"] = tmp;