diff --git a/blocksync/reactor.go b/blocksync/reactor.go index 711a8db70..2a0a61b29 100644 --- a/blocksync/reactor.go +++ b/blocksync/reactor.go @@ -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. diff --git a/node/node.go b/node/node.go index b7b4d2aef..5500b318a 100644 --- a/node/node.go +++ b/node/node.go @@ -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.