mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-29 11:15:50 +00:00
proto: deduplicate consensus params (#9287)
This commit is contained in:
+2
-3
@@ -57,10 +57,9 @@ func validateBlock(state State, block *types.Block) error {
|
||||
block.AppHash,
|
||||
)
|
||||
}
|
||||
hashCP := types.HashConsensusParams(state.ConsensusParams)
|
||||
if !bytes.Equal(block.ConsensusHash, hashCP) {
|
||||
if !bytes.Equal(block.ConsensusHash, state.ConsensusParams.Hash()) {
|
||||
return fmt.Errorf("wrong Block.Header.ConsensusHash. Expected %X, got %v",
|
||||
hashCP,
|
||||
state.ConsensusParams.Hash(),
|
||||
block.ConsensusHash,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user