mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
Add ResultHash to header
This commit is contained in:
committed by
Ethan Buchman
parent
632cc918b4
commit
58c5df729b
@ -153,6 +153,7 @@ type Header struct {
|
||||
ValidatorsHash data.Bytes `json:"validators_hash"` // validators for the current block
|
||||
ConsensusHash data.Bytes `json:"consensus_hash"` // consensus params for current block
|
||||
AppHash data.Bytes `json:"app_hash"` // state after txs from the previous block
|
||||
ResultsHash data.Bytes `json:"results_hash"` // root hash of all results from the txs from the previous block
|
||||
}
|
||||
|
||||
// Hash returns the hash of the header.
|
||||
@ -173,6 +174,7 @@ func (h *Header) Hash() data.Bytes {
|
||||
"Validators": h.ValidatorsHash,
|
||||
"App": h.AppHash,
|
||||
"Consensus": h.ConsensusHash,
|
||||
"Results": h.ResultsHash,
|
||||
})
|
||||
}
|
||||
|
||||
@ -192,7 +194,8 @@ func (h *Header) StringIndented(indent string) string {
|
||||
%s Data: %v
|
||||
%s Validators: %v
|
||||
%s App: %v
|
||||
%s Conensus: %v
|
||||
%s Conensus: %v
|
||||
%s Results: %v
|
||||
%s}#%v`,
|
||||
indent, h.ChainID,
|
||||
indent, h.Height,
|
||||
@ -205,6 +208,7 @@ func (h *Header) StringIndented(indent string) string {
|
||||
indent, h.ValidatorsHash,
|
||||
indent, h.AppHash,
|
||||
indent, h.ConsensusHash,
|
||||
indent, h.ResultsHash,
|
||||
indent, h.Hash())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user