only error if ext commit expected

This commit is contained in:
William Banfield
2022-05-19 20:03:40 -04:00
parent 340d9ad538
commit 60a60002e0

View File

@@ -200,9 +200,9 @@ func (r *Reactor) respondToPeer(ctx context.Context, msg *bcproto.BlockRequest,
var extCommit *types.ExtendedCommit
if state.ConsensusParams.ABCI.VoteExtensionsEnabled(msg.Height) {
extCommit = r.store.LoadBlockExtendedCommit(msg.Height)
}
if extCommit == nil {
return fmt.Errorf("found block in store with no commit and no extended commit: %v", block)
if extCommit == nil {
return fmt.Errorf("found block in store with no commit and no extended commit for height: %d", block.Height)
}
}
blockProto, err := block.ToProto()
if err != nil {