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

Method WriteTo

protocol/bc/hash.go:104–107  ·  view source on GitHub ↗

WriteTo satisfies the io.WriterTo interface.

(w io.Writer)

Source from the content-addressed store, hash-verified

102
103// WriteTo satisfies the io.WriterTo interface.
104func (h Hash) WriteTo(w io.Writer) (int64, error) {
105 n, err := w.Write(h.Bytes())
106 return int64(n), err
107}
108
109// ReadFrom satisfies the io.ReaderFrom interface.
110func (h *Hash) ReadFrom(r io.Reader) (int64, error) {

Callers 6

NewTxVMContextFunction · 0.45
SigHashMethod · 0.45
writeForHashFunction · 0.45
MerkleRootFunction · 0.45
calcHashMethod · 0.45
TestGetBlockFunction · 0.45

Calls 2

BytesMethod · 0.95
WriteMethod · 0.45

Tested by 1

TestGetBlockFunction · 0.36