From 7fb8f9db59b0272f95a18daa123479a84c9c54f3 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Mon, 11 Dec 2023 17:05:51 +0700 Subject: [PATCH] log blocks stat after downloading, before indexing (#8947) --- eth/stagedsync/stage_snapshots.go | 1 + turbo/services/interfaces.go | 1 + 2 files changed, 2 insertions(+) diff --git a/eth/stagedsync/stage_snapshots.go b/eth/stagedsync/stage_snapshots.go index 7f37e9ffe03..97e01545d46 100644 --- a/eth/stagedsync/stage_snapshots.go +++ b/eth/stagedsync/stage_snapshots.go @@ -131,6 +131,7 @@ func DownloadAndIndexSnapshotsIfNeed(s *StageState, ctx context.Context, tx kv.R return err } + cfg.blockReader.Snapshots().LogStat() cfg.agg.LogStats(tx, func(endTxNumMinimax uint64) uint64 { _, histBlockNumProgress, _ := rawdbv3.TxNums.FindBlockNum(tx, endTxNumMinimax) return histBlockNumProgress diff --git a/turbo/services/interfaces.go b/turbo/services/interfaces.go index 4fbe8a7c3a5..020fc824fc0 100644 --- a/turbo/services/interfaces.go +++ b/turbo/services/interfaces.go @@ -90,6 +90,7 @@ type FullBlockReader interface { } type BlockSnapshots interface { + LogStat() ReopenFolder() error SegmentsMax() uint64 ScanDir() (map[string]struct{}, []*Range, error)