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

Method WriteTo

protocol/bc/hash.go:111–114  ·  view source on GitHub ↗

WriteTo satisfies the io.WriterTo interface.

(w io.Writer)

Source from the content-addressed store, hash-verified

109
110// WriteTo satisfies the io.WriterTo interface.
111func (h Hash) WriteTo(w io.Writer) (int64, error) {
112 n, err := w.Write(h.Bytes())
113 return int64(n), err
114}
115
116// ReadFrom satisfies the io.ReaderFrom interface.
117func (h *Hash) ReadFrom(r io.Reader) (int64, error) {

Callers 1

Calls 2

BytesMethod · 0.95
WriteMethod · 0.45

Tested by

no test coverage detected