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

Method DecodeBlob

ethstorage/storage_manager.go:94–97  ·  view source on GitHub ↗
(blob []byte, blobHash common.Hash, kvIdx, size uint64)

Source from the content-addressed store, hash-verified

92}
93
94func (s *StorageManager) DecodeBlob(blob []byte, blobHash common.Hash, kvIdx, size uint64) []byte {
95 encodeType, encodeKey := s.getEncodingParams(kvIdx, blobHash)
96 return DecodeChunk(size, blob, encodeType, encodeKey)
97}
98
99func (s *StorageManager) getEncodingParams(kvIdx uint64, blobHash common.Hash) (uint64, common.Hash) {
100 shardIdx := kvIdx >> s.KvEntriesBits()

Callers 3

TestEncodingFunction · 0.95
GetBlobMethod · 0.80
GetBlobMethod · 0.80

Calls 2

getEncodingParamsMethod · 0.95
DecodeChunkFunction · 0.85

Tested by 1

TestEncodingFunction · 0.76