mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
core: fix compile
This commit is contained in:
parent
c698290536
commit
3a2b049e80
1 changed files with 1 additions and 4 deletions
|
|
@ -43,10 +43,7 @@ func (st *insertStats) report(chain []*types.Block, index int, snapDiffItems, sn
|
||||||
// Fetch the timings for the batch
|
// Fetch the timings for the batch
|
||||||
var (
|
var (
|
||||||
now = mclock.Now()
|
now = mclock.Now()
|
||||||
elapsed = now.Sub(st.startTime)
|
elapsed = now.Sub(st.startTime) + 1 // prevent zero division
|
||||||
if elapsed == 0 { // prevent zero division
|
|
||||||
elapsed = 1
|
|
||||||
}
|
|
||||||
mgasps = float64(st.usedGas) * 1000 / float64(elapsed)
|
mgasps = float64(st.usedGas) * 1000 / float64(elapsed)
|
||||||
)
|
)
|
||||||
// Update the Mgas per second gauge
|
// Update the Mgas per second gauge
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue