diff --git a/state/execution.go b/state/execution.go index aa96d22e8..ab689f5fb 100644 --- a/state/execution.go +++ b/state/execution.go @@ -384,9 +384,10 @@ func fireEvents(logger log.Logger, eventBus types.BlockEventPublisher, block *ty }}) } - if len(abciResponses.EndBlock.ValidatorUpdates) > 0 { + abciValUpdates := abciResponses.EndBlock.ValidatorUpdates + if len(abciValUpdates) > 0 { // if there were an error, we would've stopped in updateValidators - updates, _ := types.PB2TM.Validators(abciResponses.EndBlock.ValidatorUpdates) + updates, _ := types.PB2TM.ValidatorUpdates(abciValUpdates) eventBus.PublishEventValidatorSetUpdates( types.EventDataValidatorSetUpdates{ValidatorUpdates: updates}) } diff --git a/state/execution_test.go b/state/execution_test.go index e50172e17..4d7c4f999 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -260,7 +260,7 @@ func TestEndBlockValidatorUpdates(t *testing.T) { blockID := types.BlockID{block.Hash(), block.MakePartSet(testPartSize).Header()} pubkey := ed25519.GenPrivKey().PubKey() - app.ValidatorUpdates = []abci.Validator{ + app.ValidatorUpdates = []abci.ValidatorUpdate{ {PubKey: types.TM2PB.PubKey(pubkey), Power: 10}, } @@ -337,7 +337,7 @@ type testApp struct { CommitVotes []abci.VoteInfo ByzantineValidators []abci.Evidence - ValidatorUpdates []abci.Validator + ValidatorUpdates []abci.ValidatorUpdate } var _ abci.Application = (*testApp)(nil)