rebase fixes

This commit is contained in:
Ethan Buchman 2018-08-16 13:22:04 -04:00
parent 0cbf9b2a7d
commit 76bb4b15c7
2 changed files with 5 additions and 4 deletions

View File

@ -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})
}

View File

@ -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)