Populate the Header with state-derived data. Call this after MakeBlock to complete the Header.
( version tmversion.Consensus, chainID string, timestamp time.Time, lastBlockID BlockID, valHash, nextValHash []byte, consensusHash, appHash, lastResultsHash []byte, proposerAddress Address, )
| 353 | // Populate the Header with state-derived data. |
| 354 | // Call this after MakeBlock to complete the Header. |
| 355 | func (h *Header) Populate( |
| 356 | version tmversion.Consensus, chainID string, |
| 357 | timestamp time.Time, lastBlockID BlockID, |
| 358 | valHash, nextValHash []byte, |
| 359 | consensusHash, appHash, lastResultsHash []byte, |
| 360 | proposerAddress Address, |
| 361 | ) { |
| 362 | h.Version = version |
| 363 | h.ChainID = chainID |
| 364 | h.Time = timestamp |
| 365 | h.LastBlockID = lastBlockID |
| 366 | h.ValidatorsHash = valHash |
| 367 | h.NextValidatorsHash = nextValHash |
| 368 | h.ConsensusHash = consensusHash |
| 369 | h.AppHash = appHash |
| 370 | h.LastResultsHash = lastResultsHash |
| 371 | h.ProposerAddress = proposerAddress |
| 372 | } |
| 373 | |
| 374 | // ValidateBasic performs stateless validation on a Header returning an error |
| 375 | // if any validation fails. |