archiver: let FutureNode.Take return an error if no data is available

This ensures that we cannot accidentally store an invalid node.
This commit is contained in:
Michael Eischer 2022-08-19 23:19:29 +02:00
parent 2b88cd6eab
commit 8e38c43c27
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ func (fn *FutureNode) take(ctx context.Context) futureNodeResult {
}
case <-ctx.Done():
}
return futureNodeResult{}
return futureNodeResult{err: errors.Errorf("no result")}
}
// allBlobsPresent checks if all blobs (contents) of the given node are