From 1ea83f6cb2068c1e856cf25ce8bdba8d7f8393f5 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Thu, 17 Mar 2022 10:37:24 -0700 Subject: [PATCH] Don't indirect nil after a return. --- internal/consensus/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/consensus/state.go b/internal/consensus/state.go index ec452b7bd..ba17425b2 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -2169,12 +2169,12 @@ func (cs *State) defaultSetProposal(proposal *types.Proposal, recvTime time.Time if !cs.Validators.GetProposer().PubKey.VerifySignature(types.ProposalSignBytes(cs.state.ChainID, p), proposal.Signature) { return ErrInvalidProposalSignature } + proposal.Signature = p.Signature return nil }(); err != nil { return err } - proposal.Signature = p.Signature func() { cs.mtx.Lock() defer cs.mtx.Unlock()