aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
authorFurkan KAMACI <furkankamaci@gmail.com>2018-01-03 20:14:47 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-03 20:14:47 +0800
commitb8caba97099ee5eed33c3b80dd4ea540722e7d8f (patch)
tree36c3661d083d81bc52676ff9a030f6e02c91b29c /swarm
parent9d48dbf5c2d0401042134d94997be1850bf8499b (diff)
downloadgo-tangerine-b8caba97099ee5eed33c3b80dd4ea540722e7d8f.tar
go-tangerine-b8caba97099ee5eed33c3b80dd4ea540722e7d8f.tar.gz
go-tangerine-b8caba97099ee5eed33c3b80dd4ea540722e7d8f.tar.bz2
go-tangerine-b8caba97099ee5eed33c3b80dd4ea540722e7d8f.tar.lz
go-tangerine-b8caba97099ee5eed33c3b80dd4ea540722e7d8f.tar.xz
go-tangerine-b8caba97099ee5eed33c3b80dd4ea540722e7d8f.tar.zst
go-tangerine-b8caba97099ee5eed33c3b80dd4ea540722e7d8f.zip
various: remove redundant parentheses (#15793)
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