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

Method WriteTo

protocol/bc/legacy/block.go:120–124  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

118}
119
120func (b *Block) WriteTo(w io.Writer) (int64, error) {
121 ew := errors.NewWriter(w)
122 b.writeTo(ew, SerBlockFull)
123 return ew.Written(), ew.Err()
124}
125
126// assumes w has sticky errors
127func (b *Block) writeTo(w io.Writer, serflags uint8) {

Callers 10

MarshalTextMethod · 0.95
ValueMethod · 0.95
TestGetRawBlockFunction · 0.95
writeToMethod · 0.45
WriteInputCommitmentMethod · 0.45
writeInputWitnessMethod · 0.45
writeToMethod · 0.45
writeContentsMethod · 0.45
serializeFunction · 0.45
writeContentsMethod · 0.45

Calls 3

writeToMethod · 0.95
WrittenMethod · 0.95
ErrMethod · 0.95

Tested by 2

TestGetRawBlockFunction · 0.76
serializeFunction · 0.36