mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-15 11:46:11 +00:00
evidence: fix usage of time field in abci evidence (#5201)
* fix usage of time in abci evidence * update changelong and upgrading * add test cases
This commit is contained in:
+1
-1
@@ -360,7 +360,7 @@ func getBeginBlockValidatorInfo(block *types.Block, stateDB dbm.DB) (abci.LastCo
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
byzVals[i] = types.TM2PB.Evidence(ev, valset, block.Time)
|
||||
byzVals[i] = types.TM2PB.Evidence(ev, valset)
|
||||
}
|
||||
|
||||
return abci.LastCommitInfo{
|
||||
|
||||
@@ -140,10 +140,10 @@ func TestBeginBlockByzantineValidators(t *testing.T) {
|
||||
expectedByzantineValidators []abci.Evidence
|
||||
}{
|
||||
{"none byzantine", []types.Evidence{}, []abci.Evidence{}},
|
||||
{"one byzantine", []types.Evidence{ev1}, []abci.Evidence{types.TM2PB.Evidence(ev1, valSet, now)}},
|
||||
{"one byzantine", []types.Evidence{ev1}, []abci.Evidence{types.TM2PB.Evidence(ev1, valSet)}},
|
||||
{"multiple byzantine", []types.Evidence{ev1, ev2}, []abci.Evidence{
|
||||
types.TM2PB.Evidence(ev1, valSet, now),
|
||||
types.TM2PB.Evidence(ev2, valSet, now)}},
|
||||
types.TM2PB.Evidence(ev1, valSet),
|
||||
types.TM2PB.Evidence(ev2, valSet)}},
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user