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

Struct StorageManager

ethstorage/storage_manager.go:69–78  ·  view source on GitHub ↗

StorageManager is a higher-level abstract of ShardManager which provides multi-thread safety to storage file read/write and a consistent view of most-recent-finalized L1 block.

Source from the content-addressed store, hash-verified

67// StorageManager is a higher-level abstract of ShardManager which provides multi-thread safety to storage file read/write
68// and a consistent view of most-recent-finalized L1 block.
69type StorageManager struct {
70 DownloadThreadNum int
71 shardManager *ShardManager
72 localL1 int64 // local view of most-recent-finalized L1 block
73 mu sync.Mutex // protect kvEntryCount, shardManager and blobMeta read/write state
74 kvEntryCount uint64 // kvEntryCount in the most-recent-finalized L1 block
75 l1Source Il1Source
76 blobMetas map[uint64][32]byte
77 lg log.Logger
78}
79
80func NewStorageManager(sm *ShardManager, l1Source Il1Source, lg log.Logger) *StorageManager {
81 return &StorageManager{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected