Skip to content

Commit 498458b

Browse files
authored
core/state: fix eta calculation on pruning (#22386)
1 parent 3822b09 commit 498458b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/state/pruner/pruner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func prune(maindb ethdb.Database, stateBloom *stateBloom, middleStateRoots map[c
155155
if done := binary.BigEndian.Uint64(key[:8]); done > 0 {
156156
var (
157157
left = math.MaxUint64 - binary.BigEndian.Uint64(key[:8])
158-
speed = done/uint64(time.Since(start)/time.Millisecond+1) + 1 // +1s to avoid division by zero
158+
speed = done/uint64(time.Since(pstart)/time.Millisecond+1) + 1 // +1s to avoid division by zero
159159
)
160160
eta = time.Duration(left/speed) * time.Millisecond
161161
}

0 commit comments

Comments
 (0)