refactor(dchain): drop dead ctx param from startZAPIngest

The serve goroutine deliberately uses context.Background() (its lifetime is
the VM's, cancelled by Shutdown via zapIngestCancel, not the short-lived
Initialize ctx), so the ctx parameter was never used. Remove it — no slop.
Functionally identical to v1.5.17; the param carried no behavior.
This commit is contained in:
2026-06-23 15:54:50 -07:00
parent 53e0c44402
commit 812ea50c0a
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ func (vm *VM) Initialize(ctx context.Context, init block.Init) error {
if err != nil {
return err
}
if err := vm.startZAPIngest(ctx, cfg.ZAPIngestAddr); err != nil {
if err := vm.startZAPIngest(cfg.ZAPIngestAddr); err != nil {
return err
}
+4 -3
View File
@@ -72,9 +72,10 @@ func parseConfig(b []byte) (vmConfig, error) {
// VM serves HTTP only). It is ADDITIVE: it reuses RegisterCLOB (the existing socket
// seam cmd/dvenue uses) and adds no new handler logic. Must be called under vm.mu,
// after the durable state is loaded (so the socket never accepts an order before
// the VM can sequence it). The server runs in its own goroutine, cancelled by
// Shutdown via zapIngestCancel.
func (vm *VM) startZAPIngest(ctx context.Context, addr string) error {
// the VM can sequence it). The server runs in its own goroutine whose lifetime is
// the VM's — it is cancelled by Shutdown via zapIngestCancel, NOT by the (short-lived)
// Initialize context, so no Initialize ctx is taken.
func (vm *VM) startZAPIngest(addr string) error {
if addr == "" {
return nil // HTTP-compat-only: canonical socket not served in this environment
}