diff --git a/types/evidence.go b/types/evidence.go index ef56a198884..1aecd6cb862 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -344,6 +344,9 @@ func (l *LightClientAttackEvidence) ValidateBasic() error { } // this check needs to be done before we can run validate basic + if l.ConflictingBlock.SignedHeader == nil { + return errors.New("conflicting block missing signed header") + } if l.ConflictingBlock.Header == nil { return errors.New("conflicting block missing header") } diff --git a/types/evidence_test.go b/types/evidence_test.go index 36a164a8498..ec21bf6848e 100644 --- a/types/evidence_test.go +++ b/types/evidence_test.go @@ -190,7 +190,8 @@ func TestLightClientAttackEvidenceValidation(t *testing.T) { ev.CommonHeight = height }, false}, {"Nil conflicting header", func(ev *LightClientAttackEvidence) { ev.ConflictingBlock.Header = nil }, true}, - {"Nil conflicting blocl", func(ev *LightClientAttackEvidence) { ev.ConflictingBlock = nil }, true}, + {"Nil conflicting block", func(ev *LightClientAttackEvidence) { ev.ConflictingBlock = nil }, true}, + {"Nil signed header", func(ev *LightClientAttackEvidence) { ev.ConflictingBlock.SignedHeader = nil }, true}, {"Nil validator set", func(ev *LightClientAttackEvidence) { ev.ConflictingBlock.ValidatorSet = &ValidatorSet{} }, true},