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

Method Write

errors/writer.go:28–35  ·  view source on GitHub ↗

Write makes one call on the underlying writer if no error has previously occurred.

(buf []byte)

Source from the content-addressed store, hash-verified

26// Write makes one call on the underlying writer
27// if no error has previously occurred.
28func (w *Writer) Write(buf []byte) (n int, err error) {
29 if w.err != nil {
30 return 0, w.err
31 }
32 n, w.err = w.w.Write(buf)
33 w.n += int64(n)
34 return n, w.err
35}
36
37// Err returns the first error encountered by Write, if any.
38func (w *Writer) Err() error {

Callers 15

TestWriterFunction · 0.95
RootFunction · 0.45
opSHA256Function · 0.45
writePushdataFunction · 0.45
assembleItemsMethod · 0.45
writePushdataFunction · 0.45
writeVarintFunction · 0.45
resolveFunction · 0.45
ConcatMethod · 0.45
writeVarintFunction · 0.45
writePushdataFunction · 0.45
TestHashReadFromFunction · 0.45

Calls

no outgoing calls

Tested by 2

TestWriterFunction · 0.76
TestHashReadFromFunction · 0.36