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

Function NewStorageManager

ethstorage/storage_manager.go:80–87  ·  view source on GitHub ↗
(sm *ShardManager, l1Source Il1Source, lg log.Logger)

Source from the content-addressed store, hash-verified

78}
79
80func NewStorageManager(sm *ShardManager, l1Source Il1Source, lg log.Logger) *StorageManager {
81 return &StorageManager{
82 shardManager: sm,
83 l1Source: l1Source,
84 blobMetas: map[uint64][32]byte{},
85 lg: lg,
86 }
87}
88
89func (s *StorageManager) EncodeBlob(blob []byte, blobHash common.Hash, kvIdx, size uint64) []byte {
90 encodeType, encodeKey := s.getEncodingParams(kvIdx, blobHash)

Callers 12

TestMiningFunction · 0.92
TestEncodingFunction · 0.92
TestSync_RequestL2RangeFunction · 0.92
TestSync_RequestL2ListFunction · 0.92
testSyncFunction · 0.92
TestAddPeerDuringSyncingFunction · 0.92
TestAddPeerAfterSyncDoneFunction · 0.92
TestFillEmptyFunction · 0.92
initStorageManagerMethod · 0.92
setupFunction · 0.85

Calls

no outgoing calls

Tested by 11

TestMiningFunction · 0.74
TestEncodingFunction · 0.74
TestSync_RequestL2RangeFunction · 0.74
TestSync_RequestL2ListFunction · 0.74
testSyncFunction · 0.74
TestAddPeerDuringSyncingFunction · 0.74
TestAddPeerAfterSyncDoneFunction · 0.74
TestFillEmptyFunction · 0.74
setupFunction · 0.68