mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-18 22:14:35 +00:00
Add ConsensusHash to header
This commit is contained in:
committed by
Ethan Buchman
parent
56cada6a0c
commit
d151e36ea8
+1
-1
@@ -187,7 +187,7 @@ func (s *State) ValidateBlock(block *types.Block) error {
|
||||
func (s *State) validateBlock(block *types.Block) error {
|
||||
// Basic block validation.
|
||||
err := block.ValidateBasic(s.ChainID, s.LastBlockHeight,
|
||||
s.LastBlockTotalTx, s.LastBlockID, s.LastBlockTime, s.AppHash)
|
||||
s.LastBlockTotalTx, s.LastBlockID, s.LastBlockTime, s.AppHash, s.Params.Hash())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ func makeBlock(height int64, state *State) *types.Block {
|
||||
block, _ := types.MakeBlock(height, chainID,
|
||||
makeTxs(height), state.LastBlockTotalTx,
|
||||
new(types.Commit), prevBlockID, valHash,
|
||||
state.AppHash, testPartSize)
|
||||
state.AppHash, state.Params.Hash(), testPartSize)
|
||||
return block
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -269,8 +269,9 @@ func (s *State) SetBlockAndValidators(header *types.Header, blockPartsHeader typ
|
||||
|
||||
}
|
||||
|
||||
// applyChanges returns a new param set, overriding any
|
||||
// parameter that is non-zero in argument
|
||||
// applyChanges returns new ConsensusParams
|
||||
// whose fields are set to any non-zero fields of c.
|
||||
// If c is nil, it returns p unmodified, as it was passed in.
|
||||
func applyChanges(p types.ConsensusParams,
|
||||
c *abci.ConsensusParams) types.ConsensusParams {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user