mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-25 01:14:28 +00:00
types: remove nested evidence field from block (#7765)
* types: replaced EvidenceData in block structure with EvidenceList * types: introduced toProto, fromProto functions to EvidenceList * updated Changelog * Removed comments from tests
This commit is contained in:
@@ -265,8 +265,8 @@ func TestByzantinePrevoteEquivocation(t *testing.T) {
|
||||
|
||||
require.NotNil(t, msg)
|
||||
block := msg.Data().(types.EventDataNewBlock).Block
|
||||
if len(block.Evidence.Evidence) != 0 {
|
||||
evidenceFromEachValidator[j] = block.Evidence.Evidence[0]
|
||||
if len(block.Evidence) != 0 {
|
||||
evidenceFromEachValidator[j] = block.Evidence[0]
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ func TestReactorWithEvidence(t *testing.T) {
|
||||
}
|
||||
|
||||
block := msg.Data().(types.EventDataNewBlock).Block
|
||||
require.Len(t, block.Evidence.Evidence, 1)
|
||||
require.Len(t, block.Evidence, 1)
|
||||
}(sub)
|
||||
}
|
||||
|
||||
|
||||
@@ -1960,7 +1960,7 @@ func (cs *State) RecordMetrics(height int64, block *types.Block) {
|
||||
byzantineValidatorsCount int64
|
||||
)
|
||||
|
||||
for _, ev := range block.Evidence.Evidence {
|
||||
for _, ev := range block.Evidence {
|
||||
if dve, ok := ev.(*types.DuplicateVoteEvidence); ok {
|
||||
if _, val := cs.Validators.GetByAddress(dve.VoteA.ValidatorAddress); val != nil {
|
||||
byzantineValidatorsCount++
|
||||
|
||||
Reference in New Issue
Block a user