evidence: retrieve header at height of evidence for validation (#4870)

validation of lunatic evidence requires that the node retrieve the header at the height of the infringement from the block store for comparison
This commit is contained in:
Callum Waters
2020-06-03 06:44:06 +02:00
committed by GitHub
parent e538ea03d1
commit 26bea83694
6 changed files with 43 additions and 5 deletions

View File

@@ -45,6 +45,7 @@ type EvidencePool interface {
Update(*types.Block, State)
IsCommitted(types.Evidence) bool
IsPending(types.Evidence) bool
Header(int64) *types.Header
}
// MockEvidencePool is an empty implementation of EvidencePool, useful for testing.
@@ -55,3 +56,4 @@ func (me MockEvidencePool) AddEvidence(types.Evidence) error { return nil
func (me MockEvidencePool) Update(*types.Block, State) {}
func (me MockEvidencePool) IsCommitted(types.Evidence) bool { return false }
func (me MockEvidencePool) IsPending(types.Evidence) bool { return false }
func (me MockEvidencePool) Header(int64) *types.Header { return nil }