Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
swarm/storage: Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalint committed Mar 26, 2018
1 parent f32d4cc commit db1b51a
Showing 1 changed file with 0 additions and 72 deletions.
72 changes: 0 additions & 72 deletions swarm/storage/dpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,75 +100,3 @@ func (self *DPA) Store(data io.Reader, size int64, toEncrypt bool) (key Key, wai
putter := NewHasherStore(self.ChunkStore, self.hashFunc, toEncrypt)
return PyramidSplit(data, putter, putter)
}

// func (self *DPA) Start() {
// self.lock.Lock()
// defer self.lock.Unlock()
// if self.running {
// return
// }
// self.running = true
// // self.retrieveC = make(chan *Chunk, retrieveChanCapacity)
// // self.storeC = make(chan *Chunk, storeChanCapacity)
// self.quitC = make(chan bool)
// self.storeLoop()
// self.retrieveLoop()
// }
//
// func (self *DPA) Stop() {
// self.lock.Lock()
// defer self.lock.Unlock()
// if !self.running {
// return
// }
// self.running = false
// close(self.quitC)
// }

// retrieveLoop dispatches the parallel chunk retrieval requests received on the
// retrieve channel to its ChunkStore (NetStore or LocalStore)
// func (self *DPA) retrieveLoop() {
// for i := 0; i < maxRetrieveProcesses; i++ {
// go self.retrieveWorker()
// }
// log.Trace(fmt.Sprintf("dpa: retrieve loop spawning %v workers", maxRetrieveProcesses))
// }
//
// func (self *DPA) retrieveWorker() {
// for chunk := range self.retrieveC {
// storedChunk, err := self.Get(chunk.Key)
// if err != nil {
// log.Trace(fmt.Sprintf("error retrieving chunk %v: %v", chunk.Key.Log(), err))
// } else {
// chunk.SData = storedChunk.SData
// chunk.Size = storedChunk.Size
// }
// close(chunk.C)
//
// select {
// case <-self.quitC:
// return
// default:
// }
// }
// }

// storeLoop dispatches the parallel chunk store request processors
// received on the store channel to its ChunkStore (NetStore or LocalStore)
// func (self *DPA) storeLoop() {
// for i := 0; i < maxStoreProcesses; i++ {
// go self.storeWorker()
// }
// log.Trace(fmt.Sprintf("dpa: store spawning %v workers", maxStoreProcesses))
// }

// func (self *DPA) storeWorker() {
// for chunk := range self.storeC {
// self.Put(chunk)
// select {
// case <-self.quitC:
// return
// default:
// }
// }
// }

0 comments on commit db1b51a

Please sign in to comment.