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

Method readFrom

protocol/bc/legacy/block_commitment.go:25–36  ·  view source on GitHub ↗
(r *blockchain.Reader)

Source from the content-addressed store, hash-verified

23}
24
25func (bc *BlockCommitment) readFrom(r *blockchain.Reader) error {
26 _, err := bc.TransactionsMerkleRoot.ReadFrom(r)
27 if err != nil {
28 return err
29 }
30 _, err = bc.AssetsMerkleRoot.ReadFrom(r)
31 if err != nil {
32 return err
33 }
34 bc.ConsensusProgram, err = blockchain.ReadVarstr31(r)
35 return err
36}
37
38func (bc *BlockCommitment) writeTo(w io.Writer) error {
39 _, err := bc.TransactionsMerkleRoot.WriteTo(w)

Callers

nothing calls this directly

Calls 1

ReadFromMethod · 0.45

Tested by

no test coverage detected