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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user