From 8bbce609cc4da48d1c2b6062efebee07ad99a044 Mon Sep 17 00:00:00 2001 From: Elia Palme Date: Sun, 7 Sep 2025 09:32:41 +0200 Subject: [PATCH] Fixes the internal state update --- src/internal/protocol/node_table.go | 1 + src/internal/protocol/registrar.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/internal/protocol/node_table.go b/src/internal/protocol/node_table.go index 56a4742..1f06e41 100644 --- a/src/internal/protocol/node_table.go +++ b/src/internal/protocol/node_table.go @@ -106,6 +106,7 @@ func MarkSelfAsBootstrap() { Connected: true, } value, err := json.Marshal(peer) + UpdateNodeTableHook(key, value) common.ReportError(err, "Error while marshalling peer") if err := store.Put(ctx, key, value); err != nil { common.Logger.Error("Error while registering bootstrap: ", err) diff --git a/src/internal/protocol/registrar.go b/src/internal/protocol/registrar.go index 14d3efa..e309b32 100644 --- a/src/internal/protocol/registrar.go +++ b/src/internal/protocol/registrar.go @@ -133,6 +133,7 @@ func provideService(service Service) { } common.Logger.Info("Registering LLM service: ", myself) value, err := json.Marshal(myself) + UpdateNodeTableHook(key, value) common.ReportError(err, "Error while marshalling peer") err = store.Put(ctx, key, value) if err != nil { @@ -157,6 +158,7 @@ func ReannounceLocalServices() { common.Logger.Error("Error marshalling self during reannounce: ", err) return } + UpdateNodeTableHook(key, value) if err := store.Put(ctx, key, value); err != nil { common.Logger.Warn("Failed to reannounce local services: ", err) } else {