From 703bced3721d16e5a1f580a7db3575df5afe3b42 Mon Sep 17 00:00:00 2001 From: lash Date: Wed, 14 Nov 2018 18:36:29 +0100 Subject: [PATCH] swarm/storage: Write every batch on iteration --- swarm/storage/ldbstore.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swarm/storage/ldbstore.go b/swarm/storage/ldbstore.go index fbae59facf..3ecec4afc4 100644 --- a/swarm/storage/ldbstore.go +++ b/swarm/storage/ldbstore.go @@ -633,6 +633,9 @@ func (s *LDBStore) CleanGCIndex() error { } } totalEntryCount++ + if err := s.db.Write(&batch); err != nil { + return err + } it.Next() }