Skip to content

Commit

Permalink
Add block height
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender committed Dec 18, 2023
1 parent ece7e5b commit fb11842
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/metrics/fullnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ func (s *FullNodeServiceMetrics) Block(resp *types.WebsocketResponse) {
s.validationTime.Set(block.ValidationTime)

if viper.GetBool("log-block-times") {
if err = utils.LogToFile("pre-validation-time.log", fmt.Sprintf("%f", block.PreValidationTime)); err != nil {
if err = utils.LogToFile("pre-validation-time.log", fmt.Sprintf("%d:%f", block.Height, block.PreValidationTime)); err != nil {
log.Error(err.Error())
}
if err = utils.LogToFile("validation-time.log", fmt.Sprintf("%f", block.ValidationTime)); err != nil {
if err = utils.LogToFile("validation-time.log", fmt.Sprintf("%d:%f", block.Height, block.ValidationTime)); err != nil {
log.Error(err.Error())
}
}
Expand Down

0 comments on commit fb11842

Please sign in to comment.