aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage
diff options
context:
space:
mode:
authorJavier Peletier <jm@epiclabs.io>2018-09-30 15:43:10 +0800
committerJavier Peletier <jm@epiclabs.io>2018-10-03 15:12:06 +0800
commit83705ef6aa3645a6305a400fa175e44904a929f7 (patch)
tree013c6594b7d275ab5eaa90b3969e77719787483f /swarm/storage
parentb35622cf3c758d96874f287d137725946fc6341d (diff)
downloadgo-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.tar
go-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.tar.gz
go-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.tar.bz2
go-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.tar.lz
go-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.tar.xz
go-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.tar.zst
go-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.zip
swarm/storage/mru: Renamed rest of MRU references
Diffstat (limited to 'swarm/storage')
-rw-r--r--swarm/storage/localstore_test.go4
-rw-r--r--swarm/storage/mru/doc.go2
-rw-r--r--swarm/storage/mru/error.go2
-rw-r--r--swarm/storage/mru/handler.go6
-rw-r--r--swarm/storage/mru/handler_test.go4
-rw-r--r--swarm/storage/mru/request_test.go4
6 files changed, 11 insertions, 11 deletions
diff --git a/swarm/storage/localstore_test.go b/swarm/storage/localstore_test.go
index 814d270d3..b8eea4350 100644
--- a/swarm/storage/localstore_test.go
+++ b/swarm/storage/localstore_test.go
@@ -30,8 +30,8 @@ var (
)
// tests that the content address validator correctly checks the data
-// tests that resource update chunks are passed through content address validator
-// the test checking the resouce update validator internal correctness is found in resource_test.go
+// tests that Feed update chunks are passed through content address validator
+// the test checking the resouce update validator internal correctness is found in storage/feeds/handler_test.go
func TestValidator(t *testing.T) {
// set up localstore
datadir, err := ioutil.TempDir("", "storage-testvalidator")
diff --git a/swarm/storage/mru/doc.go b/swarm/storage/mru/doc.go
index 2cf2d3757..7ffd4a3c6 100644
--- a/swarm/storage/mru/doc.go
+++ b/swarm/storage/mru/doc.go
@@ -26,7 +26,7 @@ The Feed Update data is:
updatedata = Feed|Epoch|data
The full update data that goes in the chunk payload is:
-resourcedata|sign(resourcedata)
+updatedata|sign(updatedata)
Structure Summary:
diff --git a/swarm/storage/mru/error.go b/swarm/storage/mru/error.go
index 714426449..452cc80f0 100644
--- a/swarm/storage/mru/error.go
+++ b/swarm/storage/mru/error.go
@@ -35,7 +35,7 @@ const (
ErrCnt
)
-// Error is a the typed error object used for Mutable Resources
+// Error is a the typed error object used for Swarm Feeds
type Error struct {
code int
err string
diff --git a/swarm/storage/mru/handler.go b/swarm/storage/mru/handler.go
index 3ddeaafae..cc0da7df9 100644
--- a/swarm/storage/mru/handler.go
+++ b/swarm/storage/mru/handler.go
@@ -14,8 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-// Handler is the API for Mutable Resources
-// It enables creating, updating, syncing and retrieving resources and their update data
+// Handler is the API for Feeds
+// It enables creating, updating, syncing and retrieving feed updates and their data
package mru
import (
@@ -265,7 +265,7 @@ func (h *Handler) Update(ctx context.Context, r *Request) (updateAddr storage.Ad
// send the chunk
h.chunkStore.Put(ctx, chunk)
log.Trace("feed update", "updateAddr", r.idAddr, "epoch time", r.Epoch.Time, "epoch level", r.Epoch.Level, "data", chunk.Data())
- // update our resources map cache entry if the new update is older than the one we have, if we have it.
+ // update our feed updates map cache entry if the new update is older than the one we have, if we have it.
if feedUpdate != nil && r.Epoch.After(feedUpdate.Epoch) {
feedUpdate.Epoch = r.Epoch
feedUpdate.data = make([]byte, len(r.data))
diff --git a/swarm/storage/mru/handler_test.go b/swarm/storage/mru/handler_test.go
index 3bf2bda8b..b66ff0c80 100644
--- a/swarm/storage/mru/handler_test.go
+++ b/swarm/storage/mru/handler_test.go
@@ -396,7 +396,7 @@ func TestValidatorInStore(t *testing.T) {
signer := newAliceSigner()
// set up localstore
- datadir, err := ioutil.TempDir("", "storage-testresourcevalidator")
+ datadir, err := ioutil.TempDir("", "storage-testfeedsvalidator")
if err != nil {
t.Fatal(err)
}
@@ -463,7 +463,7 @@ func TestValidatorInStore(t *testing.T) {
}
}
-// create rpc and resourcehandler
+// create rpc and Feeds Handler
func setupTest(timeProvider timestampProvider, signer Signer) (fh *TestHandler, datadir string, teardown func(), err error) {
var fsClean func()
diff --git a/swarm/storage/mru/request_test.go b/swarm/storage/mru/request_test.go
index 33e975756..515de651c 100644
--- a/swarm/storage/mru/request_test.go
+++ b/swarm/storage/mru/request_test.go
@@ -228,7 +228,7 @@ func TestUpdateChunkSerializationErrorChecking(t *testing.T) {
var recovered Request
recovered.fromChunk(chunk.Address(), chunk.Data())
if !reflect.DeepEqual(recovered, r) {
- t.Fatal("Expected recovered SignedResource update to equal the original one")
+ t.Fatal("Expected recovered Request update to equal the original one")
}
}
@@ -248,7 +248,7 @@ func TestReverse(t *testing.T) {
// signer containing private key
signer := newAliceSigner()
- // set up rpc and create resourcehandler
+ // set up rpc and create Feeds handler
_, _, teardownTest, err := setupTest(timeProvider, signer)
if err != nil {
t.Fatal(err)