mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
swarm/storage: move close to correct place
This commit is contained in:
parent
03412e0ea6
commit
bb741ccf15
2 changed files with 1 additions and 6 deletions
|
|
@ -618,11 +618,11 @@ func (s *LDBStore) writeBatches() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(fmt.Sprintf("DbStore: spawn batch write (%d chunks): %v", b.Len(), err))
|
log.Error(fmt.Sprintf("DbStore: spawn batch write (%d chunks): %v", b.Len(), err))
|
||||||
}
|
}
|
||||||
|
close(c)
|
||||||
if e >= s.capacity {
|
if e >= s.capacity {
|
||||||
log.Trace(fmt.Sprintf("DbStore: collecting garbage...(%d chunks)", e))
|
log.Trace(fmt.Sprintf("DbStore: collecting garbage...(%d chunks)", e))
|
||||||
s.collectGarbage(gcArrayFreeRatio)
|
s.collectGarbage(gcArrayFreeRatio)
|
||||||
}
|
}
|
||||||
close(c)
|
|
||||||
}
|
}
|
||||||
log.Trace(fmt.Sprintf("DbStore: quit batch write loop"))
|
log.Trace(fmt.Sprintf("DbStore: quit batch write loop"))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,11 +79,6 @@ func TestMemStoreAndLDBStore(t *testing.T) {
|
||||||
chunkSize: 4096,
|
chunkSize: 4096,
|
||||||
request: false,
|
request: false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
n: 15001,
|
|
||||||
chunkSize: 4096,
|
|
||||||
request: false,
|
|
||||||
},
|
|
||||||
//{
|
//{
|
||||||
//n: 60001,
|
//n: 60001,
|
||||||
//chunkSize: 4096,
|
//chunkSize: 4096,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue