diff options
author | Janos Guljas <janos@resenje.org> | 2018-02-09 19:23:30 +0800 |
---|---|---|
committer | Janos Guljas <janos@resenje.org> | 2018-02-22 21:23:17 +0800 |
commit | a3a07350dcef0ba39829a20d8ddba4bd3463d293 (patch) | |
tree | 100f2515cadd92105537a12e6981fab2193435ee /swarm/storage | |
parent | 820cf09c98706f71d4b02b6c25e62db15830f3fb (diff) | |
parent | 1a4e68721a901e86322631fed1191025a6d14c52 (diff) | |
download | dexon-a3a07350dcef0ba39829a20d8ddba4bd3463d293.tar dexon-a3a07350dcef0ba39829a20d8ddba4bd3463d293.tar.gz dexon-a3a07350dcef0ba39829a20d8ddba4bd3463d293.tar.bz2 dexon-a3a07350dcef0ba39829a20d8ddba4bd3463d293.tar.lz dexon-a3a07350dcef0ba39829a20d8ddba4bd3463d293.tar.xz dexon-a3a07350dcef0ba39829a20d8ddba4bd3463d293.tar.zst dexon-a3a07350dcef0ba39829a20d8ddba4bd3463d293.zip |
swarm, cmd/swarm: Merge branch 'master' into multiple-ens-endpoints
Diffstat (limited to 'swarm/storage')
-rw-r--r-- | swarm/storage/chunker_test.go | 8 | ||||
-rw-r--r-- | swarm/storage/pyramid.go | 2 |
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 |