From 2e9436a7d0762df63498877503458c7df37c6ec7 Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Mon, 16 Oct 2023 11:09:43 +0200 Subject: [PATCH] Verbose --internalcl for whenever we fail at startup (#8487) Just does not make it die silently --- cmd/caplin-phase1/caplin1/run.go | 3 ++- eth/backend.go | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/caplin-phase1/caplin1/run.go b/cmd/caplin-phase1/caplin1/run.go index 6585a6a93..b7a877de3 100644 --- a/cmd/caplin-phase1/caplin1/run.go +++ b/cmd/caplin-phase1/caplin1/run.go @@ -3,6 +3,7 @@ package caplin1 import ( "context" "database/sql" + "fmt" "os" "path" "time" @@ -107,7 +108,7 @@ func RunCaplinPhase1(ctx context.Context, sentinel sentinel.SentinelClient, engi return true }) gossipManager := network.NewGossipReceiver(sentinel, forkChoice, beaconConfig, genesisConfig, caplinFreezer) - + fmt.Println("A") { // start ticking forkChoice go func() { tickInterval := time.NewTicker(2 * time.Millisecond) diff --git a/eth/backend.go b/eth/backend.go index 7d32ca258..c409ee3cf 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -798,7 +798,12 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger if err != nil { return nil, err } - go caplin1.RunCaplinPhase1(ctx, client, engine, beaconCfg, genesisCfg, state, nil, dirs, beacon.RouterConfiguration{Active: false}) + go func() { + if err := caplin1.RunCaplinPhase1(ctx, client, engine, beaconCfg, genesisCfg, state, nil, dirs, beacon.RouterConfiguration{Active: false}); err != nil { + logger.Error("could not start caplin", "err", err) + } + ctxCancel() + }() } return backend, nil