gochain / netstats

GNU General Public License v3.0
4 stars 4 forks source link

use float for avgBlockTime; disregard 0s blocks #47

Closed jmank88 closed 5 years ago

jmank88 commented 5 years ago

This PR changes the average block time calculation from int64 to float64 to maintain sub-second precision. It also disregards 0s blocks from the calculation, so that it is not skewed on startup. Screenshot from 2019-05-15 12-07-28 Screenshot from 2019-05-15 12-07-33 Fixes #46