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

Method WriteTo

protocol/bc/legacy/block_header.go:149–153  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

147}
148
149func (bh *BlockHeader) WriteTo(w io.Writer) (int64, error) {
150 ew := errors.NewWriter(w)
151 bh.writeTo(ew, SerBlockHeader)
152 return ew.Written(), ew.Err()
153}
154
155// writeTo writes bh to w.
156func (bh *BlockHeader) writeTo(w io.Writer, serflags uint8) error {

Callers 3

ValueMethod · 0.95
MarshalTextMethod · 0.95
writeToMethod · 0.45

Calls 3

writeToMethod · 0.95
WrittenMethod · 0.95
ErrMethod · 0.95

Tested by

no test coverage detected