fix up a few things

This commit is contained in:
Callum Waters
2022-11-09 15:17:43 +01:00
parent 4021df503b
commit 7018c73baf
2 changed files with 4 additions and 2 deletions

View File

@@ -236,6 +236,7 @@ func (bcR *Reactor) Receive(e p2p.Envelope) {
// NOTE: Don't sleep in the FOR_LOOP or otherwise slow it down!
func (bcR *Reactor) poolRoutine(stateSynced bool) {
bcR.metrics.Syncing.Set(1)
defer bcR.metrics.Syncing.Set(0)
trySyncTicker := time.NewTicker(trySyncIntervalMS * time.Millisecond)
defer trySyncTicker.Stop()
@@ -314,7 +315,7 @@ FOR_LOOP:
// should only happen during testing
// }
break FOR_LOOP
return
}
case <-trySyncTicker.C: // chan time
@@ -410,7 +411,6 @@ FOR_LOOP:
break FOR_LOOP
}
}
bcR.metrics.Syncing.Set(0)
}
// BroadcastStatusRequest broadcasts `BlockStore` base and height.

View File

@@ -35,6 +35,8 @@ import (
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
"github.com/tendermint/tendermint/version"
_ "net/http/pprof" //nolint: gosec
)
// Node is the highest level interface to a full Tendermint node.