From 34162023cb3f36f8c1715cd3906028ee6752f4bb Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sun, 8 Oct 2023 02:35:11 -0600 Subject: [PATCH] Removed log statement, and moved initial node write to after parsing of creation signal --- lockable.go | 1 - node.go | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lockable.go b/lockable.go index a24ffde..c00f8c7 100644 --- a/lockable.go +++ b/lockable.go @@ -148,7 +148,6 @@ func (ext *LockableExt) HandleSuccessSignal(ctx *Context, node *Node, source Nod } info, found := ext.Requirements[source] - ctx.Log.Logf("lockable", "State: %+v", ext.State) if found == false { ctx.Log.Logf("lockable", "Got success from non-requirement %s", source) } else if info.MsgID != signal.ReqID { diff --git a/node.go b/node.go index eb08188..b3169e8 100644 --- a/node.go +++ b/node.go @@ -659,12 +659,15 @@ func NewNode(ctx *Context, key ed25519.PrivateKey, node_type NodeType, buffer_si } ctx.AddNode(id, node) - err = WriteNode(ctx, node) + err = node.Process(ctx, ZeroID, NewCreateSignal()) if err != nil { return nil, err } - node.Process(ctx, ZeroID, NewCreateSignal()) + err = WriteNode(ctx, node) + if err != nil { + return nil, err + } go runNode(ctx, node)