aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage/feed/request.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/storage/feed/request.go')
-rw-r--r--swarm/storage/feed/request.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/swarm/storage/feed/request.go b/swarm/storage/feed/request.go
index 6968d8b9a..dd91a7cf4 100644
--- a/swarm/storage/feed/request.go
+++ b/swarm/storage/feed/request.go
@@ -171,9 +171,11 @@ func (r *Request) toChunk() (storage.Chunk, error) {
}
// fromChunk populates this structure from chunk data. It does not verify the signature is valid.
-func (r *Request) fromChunk(updateAddr storage.Address, chunkdata []byte) error {
+func (r *Request) fromChunk(chunk storage.Chunk) error {
// for update chunk layout see Request definition
+ chunkdata := chunk.Data()
+
//deserialize the feed update portion
if err := r.Update.binaryGet(chunkdata[:len(chunkdata)-signatureLength]); err != nil {
return err
@@ -189,7 +191,7 @@ func (r *Request) fromChunk(updateAddr storage.Address, chunkdata []byte) error
}
r.Signature = signature
- r.idAddr = updateAddr
+ r.idAddr = chunk.Address()
r.binaryData = chunkdata
return nil