aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/manifest.go
diff options
context:
space:
mode:
authorAnton Evangelatov <anton.evangelatov@gmail.com>2018-07-13 23:40:28 +0800
committerBalint Gabor <balint.g@gmail.com>2018-07-13 23:40:28 +0800
commit7c9314f231a7ddffbbbc5fec16c65519a0121eeb (patch)
treedbc4021b66ee8968ad747036741fac7e1b972a39 /swarm/api/manifest.go
parentf7d3678c28c4b92e45a458e4785bd0f1cdc20e34 (diff)
downloadgo-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar
go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.gz
go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.bz2
go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.lz
go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.xz
go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.tar.zst
go-tangerine-7c9314f231a7ddffbbbc5fec16c65519a0121eeb.zip
swarm: integrate OpenTracing; propagate ctx to internal APIs (#17169)
* swarm: propagate ctx, enable opentracing * swarm/tracing: log error when tracing is misconfigured
Diffstat (limited to 'swarm/api/manifest.go')
-rw-r--r--swarm/api/manifest.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/swarm/api/manifest.go b/swarm/api/manifest.go
index 78d1418bc..198ca22ce 100644
--- a/swarm/api/manifest.go
+++ b/swarm/api/manifest.go
@@ -212,10 +212,10 @@ func loadManifest(ctx context.Context, fileStore *storage.FileStore, hash storag
return readManifest(manifestReader, hash, fileStore, isEncrypted, quitC)
}
-func readManifest(manifestReader storage.LazySectionReader, hash storage.Address, fileStore *storage.FileStore, isEncrypted bool, quitC chan bool) (trie *manifestTrie, err error) { // non-recursive, subtrees are downloaded on-demand
+func readManifest(mr storage.LazySectionReader, hash storage.Address, fileStore *storage.FileStore, isEncrypted bool, quitC chan bool) (trie *manifestTrie, err error) { // non-recursive, subtrees are downloaded on-demand
// TODO check size for oversized manifests
- size, err := manifestReader.Size(quitC)
+ size, err := mr.Size(mr.Context(), quitC)
if err != nil { // size == 0
// can't determine size means we don't have the root chunk
log.Trace("manifest not found", "key", hash)
@@ -228,7 +228,7 @@ func readManifest(manifestReader storage.LazySectionReader, hash storage.Address
return
}
manifestData := make([]byte, size)
- read, err := manifestReader.Read(manifestData)
+ read, err := mr.Read(manifestData)
if int64(read) < size {
log.Trace("manifest not found", "key", hash)
if err == nil {