[FIX] integer divide by zero error

Signed-off-by: Leo Chen <leo@harmony.one>
pull/423/head
Leo Chen 6 years ago
parent 04c6d69fc9
commit 68a65488a0
  1. 2
      node/node_handler.go

@ -135,7 +135,7 @@ func (node *Node) messageHandler(content []byte) {
blockCount++
}
if blockCount != 0 {
if blockCount != 0 && txCount != 0 {
avgBlockSizeInBytes = avgBlockSizeInBytes / common.StorageSize(blockCount)
avgTxSize = avgTxSize / txCount
}

Loading…
Cancel
Save