don't log cancelation error at graceful shutdown (#8943)

This commit is contained in:
Alex Sharov 2023-12-12 17:07:12 +07:00 committed by GitHub
parent c1146bda49
commit 06e77d1705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -2,7 +2,6 @@ package diagnostics
import (
"context"
"fmt"
"net/http"
"github.com/ledgerwatch/erigon-lib/common"
@ -55,8 +54,6 @@ func (d *DiagnosticClient) runSnapshotListener() {
d.snapshotDownload.Sys = info.Sys
d.snapshotDownload.DownloadFinished = info.DownloadFinished
fmt.Println("snapshotDownload", d.snapshotDownload)
if info.DownloadFinished {
return
}

View File

@ -2,6 +2,7 @@ package eth1
import (
"context"
"errors"
"math/big"
"github.com/ledgerwatch/erigon-lib/chain"
@ -230,11 +231,15 @@ func (e *EthereumExecutionModule) Start(ctx context.Context) {
defer e.semaphore.Release(1)
// Run the forkchoice
if err := e.executionPipeline.Run(e.db, nil, true); err != nil {
if !errors.Is(err, context.Canceled) {
e.logger.Error("Could not start execution service", "err", err)
}
return
}
if err := e.executionPipeline.RunPrune(e.db, nil, true); err != nil {
if !errors.Is(err, context.Canceled) {
e.logger.Error("Could not start execution service", "err", err)
}
return
}
}