aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
authorLewis Marshall <lewis@lmars.net>2017-07-31 21:58:19 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-07-31 21:58:19 +0800
commit60c858a5291da6757ca6798178f4e67f77dd4122 (patch)
tree817e7f5013e0059ec07852c73a61c91dfcf6881e /swarm
parente9b850805eebc55ea8486323a1a7861b9b554430 (diff)
downloadgo-tangerine-60c858a5291da6757ca6798178f4e67f77dd4122.tar
go-tangerine-60c858a5291da6757ca6798178f4e67f77dd4122.tar.gz
go-tangerine-60c858a5291da6757ca6798178f4e67f77dd4122.tar.bz2
go-tangerine-60c858a5291da6757ca6798178f4e67f77dd4122.tar.lz
go-tangerine-60c858a5291da6757ca6798178f4e67f77dd4122.tar.xz
go-tangerine-60c858a5291da6757ca6798178f4e67f77dd4122.tar.zst
go-tangerine-60c858a5291da6757ca6798178f4e67f77dd4122.zip
swarm/api: make api.NewManifest synchronous (#14880)
Previously, NewManifest was asynchronous so subsequent code which tried to use the returned manifest could error as the manifest was not yet persisted.
Diffstat (limited to 'swarm')
-rw-r--r--swarm/api/manifest.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/swarm/api/manifest.go b/swarm/api/manifest.go
index e251620a7..90f287677 100644
--- a/swarm/api/manifest.go
+++ b/swarm/api/manifest.go
@@ -63,7 +63,7 @@ func (a *Api) NewManifest() (storage.Key, error) {
if err != nil {
return nil, err
}
- return a.Store(bytes.NewReader(data), int64(len(data)), nil)
+ return a.Store(bytes.NewReader(data), int64(len(data)), &sync.WaitGroup{})
}
// ManifestWriter is used to add and remove entries from an underlying manifest