swarm: remove superfluous line break in log statements

This commit is contained in:
Péter Szilágyi 2017-02-20 19:43:17 +02:00
parent 189dee26c6
commit 3f923f3902
No known key found for this signature in database
GPG Key ID: E9AE538CEDF8293D
2 changed files with 5 additions and 9 deletions

View File

@ -293,13 +293,11 @@ func (self *sequentialReader) ReadAt(target []byte, off int64) (n int, err error
self.lock.Lock() self.lock.Lock()
// assert self.pos <= off // assert self.pos <= off
if self.pos > off { if self.pos > off {
glog.V(logger.Error).Infof("non-sequential read attempted from sequentialReader; %d > %d", glog.V(logger.Error).Infof("non-sequential read attempted from sequentialReader; %d > %d", self.pos, off)
self.pos, off)
panic("Non-sequential read attempt") panic("Non-sequential read attempt")
} }
if self.pos != off { if self.pos != off {
glog.V(logger.Debug).Infof("deferred read in POST at position %d, offset %d.", glog.V(logger.Debug).Infof("deferred read in POST at position %d, offset %d.", self.pos, off)
self.pos, off)
wait := make(chan bool) wait := make(chan bool)
self.ahead[off] = wait self.ahead[off] = wait
self.lock.Unlock() self.lock.Unlock()
@ -315,8 +313,7 @@ func (self *sequentialReader) ReadAt(target []byte, off int64) (n int, err error
for localPos < len(target) { for localPos < len(target) {
n, err = self.reader.Read(target[localPos:]) n, err = self.reader.Read(target[localPos:])
localPos += n localPos += n
glog.V(logger.Debug).Infof("Read %d bytes into buffer size %d from POST, error %v.", glog.V(logger.Debug).Infof("Read %d bytes into buffer size %d from POST, error %v.", n, len(target), err)
n, len(target), err)
if err != nil { if err != nil {
glog.V(logger.Debug).Infof("POST stream's reading terminated with %v.", err) glog.V(logger.Debug).Infof("POST stream's reading terminated with %v.", err)
for i := range self.ahead { for i := range self.ahead {
@ -330,8 +327,7 @@ func (self *sequentialReader) ReadAt(target []byte, off int64) (n int, err error
} }
wait := self.ahead[self.pos] wait := self.ahead[self.pos]
if wait != nil { if wait != nil {
glog.V(logger.Debug).Infof("deferred read in POST at position %d triggered.", glog.V(logger.Debug).Infof("deferred read in POST at position %d triggered.", self.pos)
self.pos)
delete(self.ahead, self.pos) delete(self.ahead, self.pos)
close(wait) close(wait)
} }

View File

@ -120,7 +120,7 @@ func (self *Depo) HandleStoreRequestMsg(req *storeRequestMsgData, p *peer) {
islocal = true islocal = true
//return //return
} }
hasher := self.hashfunc() hasher := self.hashfunc()
hasher.Write(req.SData) hasher.Write(req.SData)
if !bytes.Equal(hasher.Sum(nil), req.Key) { if !bytes.Equal(hasher.Sum(nil), req.Key) {