From 80c316c430b9e0cf6e3daa56998c4793a14871a2 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Wed, 16 Oct 2024 12:50:38 +0700 Subject: [PATCH] save --- internal/erigon_node/bodies_download.go | 2 +- internal/erigon_node/headers_download.go | 2 +- internal/erigon_node/sync_stages.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/erigon_node/bodies_download.go b/internal/erigon_node/bodies_download.go index 2bbb70b..d622fb2 100644 --- a/internal/erigon_node/bodies_download.go +++ b/internal/erigon_node/bodies_download.go @@ -139,7 +139,7 @@ func (c *NodeClient) BodiesDownload(ctx context.Context, w http.ResponseWriter) return item.Id < bd.BlockNum+VisLimit // We limit visualisation to VisLimit first blocks }) //if err := templ.ExecuteTemplate(w, "body_download.html", bd); err != nil { - // fmt.Fprintf(w, "Executing body_download template: %v", err) + // fmt.Fprintf(w, "Executing body_download template: %w", err) // return //} }*/ diff --git a/internal/erigon_node/headers_download.go b/internal/erigon_node/headers_download.go index 422cf92..0977ef3 100644 --- a/internal/erigon_node/headers_download.go +++ b/internal/erigon_node/headers_download.go @@ -138,7 +138,7 @@ func (c *NodeClient) HeadersDownload(ctx context.Context, w http.ResponseWriter) return item.Id < hd.HeaderNum+VisLimit // We limit visualisation to VisLimit first blocks }) //if err := templ.ExecuteTemplate(w, "headers_download.html", hd); err != nil { - // fmt.Fprintf(w, "Executing headers_download template: %v", err) + // fmt.Fprintf(w, "Executing headers_download template: %w", err) // return //} }*/ diff --git a/internal/erigon_node/sync_stages.go b/internal/erigon_node/sync_stages.go index 304c5f4..e744d3e 100644 --- a/internal/erigon_node/sync_stages.go +++ b/internal/erigon_node/sync_stages.go @@ -28,7 +28,7 @@ func (c *NodeClient) FindSyncStages(ctx context.Context) (SyncStageProgress, err func (ss *SyncStages) fetchSyncStageProgress(ctx context.Context) (SyncStageProgress, error) { if cursorError := ss.rc.Init(ctx, syncStageDb, syncStageTable, nil); cursorError != nil { - return nil, fmt.Errorf("could not initialize remote cursor: %v", cursorError) + return nil, fmt.Errorf("could not initialize remote cursor: %w", cursorError) } syncStageProgress := make(SyncStageProgress) @@ -46,13 +46,13 @@ func (ss *SyncStages) fetchSyncStageProgress(ctx context.Context) (SyncStageProg syncProgress, unmarshalError := ss.unmarshal(v) if unmarshalError != nil { - return nil, fmt.Errorf("could not unmarshal sync stage data: %v", unmarshalError) + return nil, fmt.Errorf("could not unmarshal sync stage data: %w", unmarshalError) } syncStageProgress[syncStage] = strconv.FormatUint(syncProgress, syncProgressBase) } if e != nil { - return nil, fmt.Errorf("could not process remote cursor line: %v", e) + return nil, fmt.Errorf("could not process remote cursor line: %w", e) } return syncStageProgress, nil