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

Function WriteVarstr31

encoding/blockchain/blockchain.go:161–168  ·  view source on GitHub ↗
(w io.Writer, str []byte)

Source from the content-addressed store, hash-verified

159}
160
161func WriteVarstr31(w io.Writer, str []byte) (int, error) {
162 n, err := WriteVarint31(w, uint64(len(str)))
163 if err != nil {
164 return n, err
165 }
166 n2, err := w.Write(str)
167 return n + n2, err
168}
169
170// WriteVarstrList writes a varint31 length prefix followed by the
171// elements of l as varstrs.

Callers 7

WriteVarstrListFunction · 0.85
WriteExtensibleStringFunction · 0.85
TestVarstring31Function · 0.85
TestEmptyVarstring31Function · 0.85
TestVarstrListWithEOFFunction · 0.85
TestTooLongVarstrListFunction · 0.85
TestReadWriteVarstr31Function · 0.85

Calls 2

WriteVarint31Function · 0.85
WriteMethod · 0.45

Tested by 5

TestVarstring31Function · 0.68
TestEmptyVarstring31Function · 0.68
TestVarstrListWithEOFFunction · 0.68
TestTooLongVarstrListFunction · 0.68
TestReadWriteVarstr31Function · 0.68