From 2d95e389860f34f9f6b9501df92885367a6b8bfa Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Tue, 6 Jul 2021 14:27:20 +0200 Subject: [PATCH] Revert "consensus: skip all messages during sync (#6577)" (#6654) This reverts commit 13b95e71274e6eed250eb1b2d0afee08f79c0251. --- internal/consensus/reactor.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/consensus/reactor.go b/internal/consensus/reactor.go index fdef87ab8..59a1b899d 100644 --- a/internal/consensus/reactor.go +++ b/internal/consensus/reactor.go @@ -1197,6 +1197,11 @@ func (r *Reactor) handleVoteSetBitsMessage(envelope p2p.Envelope, msgI Message) // It will handle errors and any possible panics gracefully. A caller can handle // any error returned by sending a PeerError on the respective channel. // +// NOTE: We process these messages even when we're fast_syncing. Messages affect +// either a peer state or the consensus state. Peer state updates can happen in +// parallel, but processing of proposals, block parts, and votes are ordered by +// the p2p channel. +// // NOTE: We block on consensus state for proposals, block parts, and votes. func (r *Reactor) handleMessage(chID p2p.ChannelID, envelope p2p.Envelope) (err error) { defer func() { @@ -1206,12 +1211,6 @@ func (r *Reactor) handleMessage(chID p2p.ChannelID, envelope p2p.Envelope) (err } }() - // Just skip the entire message during syncing so that we can - // process fewer messages. - if r.WaitSync() { - return - } - // We wrap the envelope's message in a Proto wire type so we can convert back // the domain type that individual channel message handlers can work with. We // do this here once to avoid having to do it for each individual message type.