MCPcopy Create free account
hub / github.com/ethstorage/es-node / writeChunk

Method writeChunk

ethstorage/data_shard.go:401–408  ·  view source on GitHub ↗
(chunkIdx uint64, b []byte)

Source from the content-addressed store, hash-verified

399}
400
401func (ds *DataShard) writeChunk(chunkIdx uint64, b []byte) error {
402 for _, df := range ds.dataFiles {
403 if df.Contains(chunkIdx) {
404 return df.Write(chunkIdx, b)
405 }
406 }
407 return fmt.Errorf("chunk not found: the shard is not completed?")
408}
409
410func (ds *DataShard) WriteMeta(kvIdx uint64, b []byte) error {
411 for _, df := range ds.dataFiles {

Callers 1

WriteWithMethod · 0.95

Calls 2

ContainsMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected