From 60c858a5291da6757ca6798178f4e67f77dd4122 Mon Sep 17 00:00:00 2001
From: Lewis Marshall <lewis@lmars.net>
Date: Mon, 31 Jul 2017 14:58:19 +0100
Subject: 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.
---
 swarm/api/manifest.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'swarm/api')

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
-- 
cgit v1.2.3