| 25 | ) |
| 26 | |
| 27 | type BlobDiskCache struct { |
| 28 | store billy.Database |
| 29 | storePath string |
| 30 | blockLookup map[uint64]*blockBlobs // Lookup table mapping block number to blockBlob |
| 31 | kvIndexLookup map[uint64]uint64 // Lookup table mapping kvIndex to blob billy entries id |
| 32 | mu sync.RWMutex // protects lookup and index maps |
| 33 | lg log.Logger |
| 34 | } |
| 35 | |
| 36 | func NewBlobDiskCache(datadir string, lg log.Logger) *BlobDiskCache { |
| 37 | cbdir := filepath.Join(datadir, blobCacheDir) |
nothing calls this directly
no outgoing calls
no test coverage detected