From 396a03c229f1bea1c3c1a75386306362cf2bff11 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 2 Sep 2025 11:15:21 +0200 Subject: [PATCH] better fallback tests and error messages --- src/solanaceae/crdtnotes/crdtnotes_sync.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/solanaceae/crdtnotes/crdtnotes_sync.cpp b/src/solanaceae/crdtnotes/crdtnotes_sync.cpp index 1a444c3..ff8a440 100644 --- a/src/solanaceae/crdtnotes/crdtnotes_sync.cpp +++ b/src/solanaceae/crdtnotes/crdtnotes_sync.cpp @@ -38,7 +38,11 @@ float CRDTNotesSync::iterate(float time_delta) { // TODO: this is a fallback, remove if (c.all_of()) { for (const auto child : c.get().subs) { + if (c.registry()->all_of(child)) { + continue; + } if (!c.registry()->all_of(child)) { + std::cerr << "CRDTNotesSync: error, fallback failed\n"; continue; } @@ -65,7 +69,11 @@ float CRDTNotesSync::iterate(float time_delta) { // TODO: this is a fallback, remove if (c.all_of()) { for (const auto child : c.get().subs) { + if (c.registry()->all_of(child)) { + continue; + } if (!c.registry()->all_of(child)) { + std::cerr << "CRDTNotesSync: error, fallback failed\n"; continue; }