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

Function writePushdata

protocol/txvm/item.go:111–117  ·  view source on GitHub ↗
(buf *bytes.Buffer, data []byte)

Source from the content-addressed store, hash-verified

109}
110
111func writePushdata(buf *bytes.Buffer, data []byte) {
112 op := uint64(len(data)) + op.MinPushdata
113 varint := [binary.MaxVarintLen64]byte{}
114 n := binary.PutUvarint(varint[:], op)
115 buf.Write(varint[:n])
116 buf.Write(data[:])
117}
118
119func uninspect(t Tuple) (Item, error) {
120 if len(t) == 0 {

Callers 2

encodeMethod · 0.70
encodeMethod · 0.70

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected