swarm: Debug API and HasChunks() API endpoint (#18980)
This commit is contained in:
committed by
Anton Evangelatov
parent
33d0a0efa6
commit
41597c2856
@@ -48,6 +48,11 @@ func NewMemStore(params *StoreParams, _ *LDBStore) (m *MemStore) {
|
||||
}
|
||||
}
|
||||
|
||||
// Has needed to implement SyncChunkStore
|
||||
func (m *MemStore) Has(_ context.Context, addr Address) bool {
|
||||
return m.cache.Contains(addr)
|
||||
}
|
||||
|
||||
func (m *MemStore) Get(_ context.Context, addr Address) (Chunk, error) {
|
||||
if m.disabled {
|
||||
return nil, ErrChunkNotFound
|
||||
|
||||
Reference in New Issue
Block a user