mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-30 13:11:38 +00:00
state: send byzantine validators in BeginBlock
This commit is contained in:
@ -191,13 +191,20 @@ func execBlockOnProxyApp(logger log.Logger, proxyAppConn proxy.AppConnConsensus,
|
||||
}
|
||||
|
||||
// TODO: determine which validators were byzantine
|
||||
byzantineVals := make([]*abci.Evidence, len(block.Evidence.Evidence))
|
||||
for i, ev := range block.Evidence.Evidence {
|
||||
byzantineVals[i] = &abci.Evidence{
|
||||
PubKey: ev.Address(), // XXX
|
||||
Height: ev.Height(),
|
||||
}
|
||||
}
|
||||
|
||||
// Begin block
|
||||
_, err := proxyAppConn.BeginBlockSync(abci.RequestBeginBlock{
|
||||
Hash: block.Hash(),
|
||||
Header: types.TM2PB.Header(block.Header),
|
||||
AbsentValidators: absentVals,
|
||||
ByzantineValidators: nil,
|
||||
ByzantineValidators: byzantineVals,
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error("Error in proxyAppConn.BeginBlock", "err", err)
|
||||
|
Reference in New Issue
Block a user