This commit is contained in:
Nishant Das
2019-04-26 13:15:53 +08:00
committed by GitHub
parent 89600e8978
commit 09083b072c
2 changed files with 6 additions and 1 deletions

View File

@@ -24,6 +24,10 @@ var (
Name: "regsync_received_blocks",
Help: "The number of received blocks",
})
forkedBlock = promauto.NewCounter(prometheus.CounterOpts{
Name: "regsync_received_forked_blocks",
Help: "The number of received forked blocks",
})
recBlockAnnounce = promauto.NewCounter(prometheus.CounterOpts{
Name: "regsync_received_block_announce",
Help: "The number of received block announcements",

View File

@@ -192,7 +192,8 @@ func (rs *RegularSync) validateAndProcessBlock(
return nil, nil, false, err
}
} else {
log.Errorf("Received Block from a Forked Chain %#x with slot %d", blockRoot, block.Slot)
forkedBlock.Inc()
log.Warnf("Received Block from a Forked Chain with root %#x and slot %d", blockRoot, block.Slot)
}
sentBlocks.Inc()