fixes double lookups when block does not exist #739
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #699
CodexNodeRef.retrieve
always tried to refetch manifests for whichfetchManifest
fails, even if these failures were not due to decoding errors (which would indicate that the CID was pointing to a block which was not a manifest) but timeouts (which would indicate that the CID does not exist, and we should just return with a failure).This means that, if the CID does not exist, we had to wait for twice the timeout (currently 20 minutes) before getting an error. This PR fixes that, so that we lookup only once and the actual timeout is respected.