MCPcopy Create free account
hub / github.com/chain/Core / writeForHash

Method writeForHash

protocol/bc/blockheader.go:9–18  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

7
8func (BlockHeader) typ() string { return "blockheader" }
9func (bh *BlockHeader) writeForHash(w io.Writer) {
10 mustWriteForHash(w, bh.Version)
11 mustWriteForHash(w, bh.Height)
12 mustWriteForHash(w, bh.PreviousBlockId)
13 mustWriteForHash(w, bh.TimestampMs)
14 mustWriteForHash(w, bh.TransactionsRoot)
15 mustWriteForHash(w, bh.AssetsRoot)
16 mustWriteForHash(w, bh.NextConsensusProgram)
17 mustWriteForHash(w, bh.ExtHash)
18}
19
20// NewBlockHeader creates a new BlockHeader and populates
21// its body.

Callers

nothing calls this directly

Calls 1

mustWriteForHashFunction · 0.85

Tested by

no test coverage detected