aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage/memstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/storage/memstore.go')
-rw-r--r--swarm/storage/memstore.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/swarm/storage/memstore.go b/swarm/storage/memstore.go
index 86e5813d1..611ac3bc5 100644
--- a/swarm/storage/memstore.go
+++ b/swarm/storage/memstore.go
@@ -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