mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-21 22:56:22 +00:00
add nil check for block load
This commit is contained in:
@@ -202,7 +202,9 @@ func (r *Reactor) respondToPeer(ctx context.Context, msg *bcproto.BlockRequest,
|
||||
extCommit = r.store.LoadBlockExtendedCommit(msg.Height)
|
||||
} else {
|
||||
c := r.store.LoadBlockCommit(msg.Height)
|
||||
extCommit = c.WrappedExtendedCommit()
|
||||
if extCommit != nil {
|
||||
extCommit = c.WrappedExtendedCommit()
|
||||
}
|
||||
}
|
||||
if extCommit == nil {
|
||||
return fmt.Errorf("found block in store with no commit and no extended commit: %v", block)
|
||||
|
||||
Reference in New Issue
Block a user