Browse Source

rebase fixes

pull/2159/head
Ethan Buchman 6 years ago
parent
commit
76bb4b15c7
2 changed files with 5 additions and 4 deletions
  1. +3
    -2
      state/execution.go
  2. +2
    -2
      state/execution_test.go

+ 3
- 2
state/execution.go 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})
}


+ 2
- 2
state/execution_test.go 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)


Loading…
Cancel
Save