mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 19:53:58 +00:00
send ValidatorSetUpdates event when validator set changes (#2161)
Refs #1916
This commit is contained in:
@@ -380,6 +380,13 @@ func fireEvents(logger log.Logger, eventBus types.BlockEventPublisher, block *ty
|
||||
Result: *(abciResponses.DeliverTx[i]),
|
||||
}})
|
||||
}
|
||||
|
||||
if len(abciResponses.EndBlock.ValidatorUpdates) > 0 {
|
||||
// if there were an error, we would've stopped in updateValidators
|
||||
updates, _ := types.PB2TM.Validators(abciResponses.EndBlock.ValidatorUpdates)
|
||||
eventBus.PublishEventValidatorSetUpdates(
|
||||
types.EventDataValidatorSetUpdates{ValidatorUpdates: updates})
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user