From 3b7f2c7b2e917c0be8beef15edc377b1fe8bd5cb Mon Sep 17 00:00:00 2001 From: James Hiew Date: Wed, 22 Jun 2022 12:47:11 +0100 Subject: [PATCH] Explicitly retry queryMaj23Routine if rs.Votes == nil --- internal/consensus/reactor.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/consensus/reactor.go b/internal/consensus/reactor.go index 53e0b540d5e..641fbeefecc 100644 --- a/internal/consensus/reactor.go +++ b/internal/consensus/reactor.go @@ -844,6 +844,11 @@ func (r *Reactor) queryMaj23Routine(ctx context.Context, ps *PeerState, stateCh rs := r.getRoundState() prs := ps.GetRoundState() + if rs.Votes == nil { + r.logger.Debug("rs.Votes has not yet been initialized, will retry queryMaj23Routine") + continue + } + wg := &sync.WaitGroup{} if rs.Height == prs.Height {