Take the foundation's ports as genesis inputs, check them free, and hand them to the controller as the node's settings (hq ADR 0100)

This commit is contained in:
2026-09-22 17:28:36 +02:00
parent 770f589401
commit 3964d9da0a
10 changed files with 902 additions and 14 deletions
+10
View File
@@ -124,6 +124,9 @@ func registerAndAssign(ctx context.Context, o Options, control controlPlane, mod
// the only place the reason appears.
say(indent(refusal))
}
if err := prepareModule(ctx, o, control, module, say); err != nil {
return out, err
}
return out, nil
}
@@ -209,3 +212,10 @@ func pinPlaceholder(manifest []byte, reference, module string) ([]byte, int, err
}
return pinned, places, nil
}
// prepareModule is what genesis tells the controller about a module on this node once it is
// assigned and before it is pushed: the ports this node gave it (novox/hq ADR 0100).
func prepareModule(ctx context.Context, o Options, control controlPlane, module string,
say func(string)) error {
return setFoundationSettings(ctx, o, control, module, say)
}