diff --git a/blockchain/v0/reactor.go b/blockchain/v0/reactor.go index 591dd3a37..23055904a 100644 --- a/blockchain/v0/reactor.go +++ b/blockchain/v0/reactor.go @@ -349,6 +349,14 @@ func (r *Reactor) processPeerUpdates() { } } +// BroadcastStatusRequest broadcasts a StatusRequest envelope. +func (r *Reactor) BroadcastStatusRequest() { + r.blockchainCh.Out() <- p2p.Envelope{ + Broadcast: true, + Message: &bcproto.StatusRequest{}, + } +} + // ============================================================================ // ============================================================================ // ============================================================================ @@ -552,15 +560,3 @@ FOR_LOOP: } } } - -// BroadcastStatusRequest broadcasts `BlockStore` base and height. -func (bcR *BlockchainReactor) BroadcastStatusRequest() { - bm, err := bc.EncodeMsg(&bcproto.StatusRequest{}) - if err != nil { - bcR.Logger.Error("could not convert StatusRequest to proto", "err", err) - return - } - - // We don't care about whenever broadcast is successful or not. - _ = bcR.Switch.Broadcast(BlockchainChannel, bm) -}