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.
This commit is contained in:
committed by
Felix Lange
parent
e9b850805e
commit
60c858a529
@ -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
|
||||
|
Reference in New Issue
Block a user