state.VerifyEvidence enforces EvidenceParams.MaxAge

This commit is contained in:
Ethan Buchman
2017-12-26 20:27:32 -05:00
parent c7acdfadf2
commit cc418e5dab
2 changed files with 9 additions and 2 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ type BlockGossip struct {
// EvidenceParams determine how we handle evidence of malfeasance
type EvidenceParams struct {
MaxHeightDiff int `json:"max_height_diff"` // only accept new evidence more recent than this
MaxAge int `json:"max_age"` // only accept new evidence more recent than this
}
// DefaultConsensusParams returns a default ConsensusParams.
@@ -80,7 +80,7 @@ func DefaultBlockGossip() BlockGossip {
// DefaultEvidence Params returns a default EvidenceParams.
func DefaultEvidenceParams() EvidenceParams {
return EvidenceParams{
MaxHeightDiff: 100000, // 27.8 hrs at 1block/s
MaxAge: 100000, // 27.8 hrs at 1block/s
}
}