aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
Diffstat (limited to 'swarm')
-rw-r--r--swarm/storage/chunker_test.go8
-rw-r--r--swarm/storage/pyramid.go2
2 files changed, 5 insertions, 5 deletions
diff --git a/swarm/storage/chunker_test.go b/swarm/storage/chunker_test.go
index 6178a7bb1..6b828970b 100644
--- a/swarm/storage/chunker_test.go
+++ b/swarm/storage/chunker_test.go
@@ -60,7 +60,7 @@ func (self *chunkerTester) Split(chunker Splitter, data io.Reader, size int64, c
for {
select {
case <-timeout:
- return errors.New(("Split timeout error"))
+ return errors.New("Split timeout error")
case <-quitC:
return nil
case chunk := <-chunkC:
@@ -97,7 +97,7 @@ func (self *chunkerTester) Append(chunker Splitter, rootKey Key, data io.Reader,
for {
select {
case <-timeout:
- return errors.New(("Append timeout error"))
+ return errors.New("Append timeout error")
case <-quitC:
return nil
case chunk := <-chunkC:
@@ -146,7 +146,7 @@ func (self *chunkerTester) Join(chunker Chunker, key Key, c int, chunkC chan *Ch
for {
select {
case <-timeout:
- return errors.New(("Join timeout error"))
+ return errors.New("Join timeout error")
case chunk, ok := <-chunkC:
if !ok {
close(quitC)
@@ -155,7 +155,7 @@ func (self *chunkerTester) Join(chunker Chunker, key Key, c int, chunkC chan *Ch
// this just mocks the behaviour of a chunk store retrieval
stored, success := self.chunks[chunk.Key.String()]
if !success {
- return errors.New(("Not found"))
+ return errors.New("Not found")
}
chunk.SData = stored.SData
chunk.Size = int64(binary.LittleEndian.Uint64(chunk.SData[0:8]))
diff --git a/swarm/storage/pyramid.go b/swarm/storage/pyramid.go
index f2e85cb5b..19d493405 100644
--- a/swarm/storage/pyramid.go
+++ b/swarm/storage/pyramid.go
@@ -338,7 +338,7 @@ func (self *PyramidChunker) loadTree(chunkLevel [][]*TreeEntry, key Key, chunkC
chunkLevel[depth-1] = append(chunkLevel[depth-1], newEntry)
// Add the rest of the tree
- for lvl := (depth - 1); lvl >= 1; lvl-- {
+ for lvl := depth - 1; lvl >= 1; lvl-- {
//TODO(jmozah): instead of loading finished branches and then trim in the end,
//avoid loading them in the first place