good morning!!!!

Skip to content
Snippets Groups Projects
Commit d85afb7d authored by Martin Holst Swende's avatar Martin Holst Swende Committed by Igor Mandrigin
Browse files

core/state: fix eta calculation on pruning (#22386)

parent e052d8e2
Branches
Tags
No related merge requests found
...@@ -155,7 +155,7 @@ func prune(maindb ethdb.Database, stateBloom *stateBloom, middleStateRoots map[c ...@@ -155,7 +155,7 @@ func prune(maindb ethdb.Database, stateBloom *stateBloom, middleStateRoots map[c
if done := binary.BigEndian.Uint64(key[:8]); done > 0 { if done := binary.BigEndian.Uint64(key[:8]); done > 0 {
var ( var (
left = math.MaxUint64 - binary.BigEndian.Uint64(key[:8]) left = math.MaxUint64 - binary.BigEndian.Uint64(key[:8])
speed = done/uint64(time.Since(start)/time.Millisecond+1) + 1 // +1s to avoid division by zero speed = done/uint64(time.Since(pstart)/time.Millisecond+1) + 1 // +1s to avoid division by zero
) )
eta = time.Duration(left/speed) * time.Millisecond eta = time.Duration(left/speed) * time.Millisecond
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment