Sec/bucky/35 commit duplicate evidence (#36)

Don't add committed evidence to evpool
This commit is contained in:
Ethan Buchman
2019-02-08 18:25:48 -05:00
committed by GitHub
parent cce4d21ccb
commit 90ba63948a
10 changed files with 52 additions and 32 deletions

View File

@ -185,6 +185,8 @@ func VerifyEvidence(stateDB dbm.DB, state State, evidence types.Evidence) error
// The address must have been an active validator at the height.
// NOTE: we will ignore evidence from H if the key was not a validator
// at H, even if it is a validator at some nearby H'
// XXX: this makes lite-client bisection as is unsafe
// See https://github.com/tendermint/tendermint/issues/3244
ev := evidence
height, addr := ev.Height(), ev.Address()
_, val := valset.GetByAddress(addr)