evidence: remove ConflictingHeaders type (#5317)

## Description

Remove ConflictingHeaders & compositeEvidence types


Ref #5288
This commit is contained in:
Marko
2020-09-01 18:34:37 +02:00
committed by GitHub
parent 2b58a62721
commit e0140e4beb
13 changed files with 132 additions and 1071 deletions

View File

@@ -87,12 +87,7 @@ func (b *Block) ValidateBasic() error {
// NOTE: b.Evidence.Evidence may be nil, but we're just looping.
for i, ev := range b.Evidence.Evidence {
switch ev.(type) {
case *ConflictingHeadersEvidence:
// ConflictingHeadersEvidence must be broken up in pieces and never
// committed as a single piece.
return fmt.Errorf("found ConflictingHeadersEvidence (#%d)", i)
case *PotentialAmnesiaEvidence:
if _, ok := ev.(*PotentialAmnesiaEvidence); ok {
// PotentialAmnesiaEvidence does not contribute to anything on its own, so
// reject it as well.
return fmt.Errorf("found PotentialAmnesiaEvidence (#%d)", i)