mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-12 23:01:30 +00:00
blockchain v0: lint++
This commit is contained in:
@@ -371,16 +371,6 @@ func (r *Reactor) SwitchToFastSync(state sm.State) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *Reactor) broadcastStatusRequest() {
|
||||
r.poolWG.Add(1)
|
||||
defer r.poolWG.Done()
|
||||
|
||||
r.blockchainCh.Out() <- p2p.Envelope{
|
||||
Broadcast: true,
|
||||
Message: &bcproto.StatusRequest{},
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Reactor) requestRoutine() {
|
||||
statusUpdateTicker := time.NewTicker(statusUpdateIntervalSeconds * time.Second)
|
||||
defer statusUpdateTicker.Stop()
|
||||
@@ -410,7 +400,15 @@ func (r *Reactor) requestRoutine() {
|
||||
}
|
||||
|
||||
case <-statusUpdateTicker.C:
|
||||
go r.broadcastStatusRequest()
|
||||
go func() {
|
||||
r.poolWG.Add(1)
|
||||
defer r.poolWG.Done()
|
||||
|
||||
r.blockchainCh.Out() <- p2p.Envelope{
|
||||
Broadcast: true,
|
||||
Message: &bcproto.StatusRequest{},
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user