diff --git a/state/execution.go b/state/execution.go index 59d18b48b..34e435627 100644 --- a/state/execution.go +++ b/state/execution.go @@ -199,6 +199,7 @@ func execBlockOnProxyApp(logger log.Logger, proxyAppConn proxy.AppConnConsensus, byzantineVals := make([]abci.Evidence, len(block.Evidence.Evidence)) for i, ev := range block.Evidence.Evidence { byzantineVals[i] = abci.Evidence{ + Type: []byte(ev.String()), PubKey: ev.Address(), // XXX Height: ev.Height(), } diff --git a/state/execution_test.go b/state/execution_test.go index 170bf2665..87b4a31a7 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -110,10 +110,10 @@ func TestBeginBlockByzantineValidators(t *testing.T) { expectedByzantineValidators []abci.Evidence }{ {"none byzantine", []types.Evidence{}, []abci.Evidence{}}, - {"one byzantine", []types.Evidence{ev1}, []abci.Evidence{{nil, ev1.Address(), ev1.Height(), int64(0)}}}, + {"one byzantine", []types.Evidence{ev1}, []abci.Evidence{{[]byte(ev1.String()), ev1.Address(), ev1.Height(), int64(0)}}}, {"multiple byzantine", []types.Evidence{ev1, ev2}, []abci.Evidence{ - {nil, ev1.Address(), ev1.Height(), int64(0)}, - {nil, ev2.Address(), ev2.Height(), int64(0)}}}, + {[]byte(ev1.String()), ev1.Address(), ev1.Height(), int64(0)}, + {[]byte(ev2.String()), ev2.Address(), ev2.Height(), int64(0)}}}, } for _, tc := range testCases { diff --git a/types/evidence.go b/types/evidence.go index bbfd6c81b..d926de9a4 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -40,7 +40,7 @@ type Evidence interface { Verify(chainID string) error // verify the evidence Equal(Evidence) bool // check equality of evidence - String() string + String() string // used as type in abci.Evidence } func RegisterEvidences(cdc *amino.Codec) {