mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 12:51:22 +00:00
Add ResultHash to header
This commit is contained in:
committed by
Ethan Buchman
parent
632cc918b4
commit
58c5df729b
@ -110,7 +110,7 @@ func makeVote(header *types.Header, vals *types.ValidatorSet, key crypto.PrivKey
|
||||
// Silences warning that vals can also be merkle.Hashable
|
||||
// nolint: interfacer
|
||||
func genHeader(chainID string, height int64, txs types.Txs,
|
||||
vals *types.ValidatorSet, appHash, consHash []byte) *types.Header {
|
||||
vals *types.ValidatorSet, appHash, consHash, resHash []byte) *types.Header {
|
||||
|
||||
return &types.Header{
|
||||
ChainID: chainID,
|
||||
@ -124,14 +124,15 @@ func genHeader(chainID string, height int64, txs types.Txs,
|
||||
DataHash: txs.Hash(),
|
||||
AppHash: appHash,
|
||||
ConsensusHash: consHash,
|
||||
ResultsHash: resHash,
|
||||
}
|
||||
}
|
||||
|
||||
// GenCommit calls genHeader and signHeader and combines them into a Commit.
|
||||
func (v ValKeys) GenCommit(chainID string, height int64, txs types.Txs,
|
||||
vals *types.ValidatorSet, appHash, consHash []byte, first, last int) Commit {
|
||||
vals *types.ValidatorSet, appHash, consHash, resHash []byte, first, last int) Commit {
|
||||
|
||||
header := genHeader(chainID, height, txs, vals, appHash, consHash)
|
||||
header := genHeader(chainID, height, txs, vals, appHash, consHash, resHash)
|
||||
check := Commit{
|
||||
Header: header,
|
||||
Commit: v.signHeader(header, first, last),
|
||||
@ -141,9 +142,9 @@ func (v ValKeys) GenCommit(chainID string, height int64, txs types.Txs,
|
||||
|
||||
// GenFullCommit calls genHeader and signHeader and combines them into a Commit.
|
||||
func (v ValKeys) GenFullCommit(chainID string, height int64, txs types.Txs,
|
||||
vals *types.ValidatorSet, appHash, consHash []byte, first, last int) FullCommit {
|
||||
vals *types.ValidatorSet, appHash, consHash, resHash []byte, first, last int) FullCommit {
|
||||
|
||||
header := genHeader(chainID, height, txs, vals, appHash, consHash)
|
||||
header := genHeader(chainID, height, txs, vals, appHash, consHash, resHash)
|
||||
commit := Commit{
|
||||
Header: header,
|
||||
Commit: v.signHeader(header, first, last),
|
||||
|
Reference in New Issue
Block a user