MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / Populate

Method Populate

types/block.go:355–372  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

353// Populate the Header with state-derived data.
354// Call this after MakeBlock to complete the Header.
355func (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.

Callers 1

MakeBlockMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected