mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
state: return to-be-used function
This commit is contained in:
parent
331857c9e6
commit
b3c5933a23
@ -158,6 +158,18 @@ func updateValidators(validators *types.ValidatorSet, changedValidators []*abci.
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return a bit array of validators that signed the last commit
|
||||||
|
// NOTE: assumes commits have already been authenticated
|
||||||
|
func commitBitArrayFromBlock(block *types.Block) *cmn.BitArray {
|
||||||
|
signed := cmn.NewBitArray(len(block.LastCommit.Precommits))
|
||||||
|
for i, precommit := range block.LastCommit.Precommits {
|
||||||
|
if precommit != nil {
|
||||||
|
signed.SetIndex(i, true) // val_.LastCommitHeight = block.Height - 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return signed
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
// Validate block
|
// Validate block
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user