fix: propagate provider option through session and broker to trustles…#833
Draft
nitininhouse wants to merge 1 commit intoipfs:mainfrom
Draft
fix: propagate provider option through session and broker to trustles…#833nitininhouse wants to merge 1 commit intoipfs:mainfrom
nitininhouse wants to merge 1 commit intoipfs:mainfrom
Conversation
SgtPooki
reviewed
Jul 24, 2025
|
|
||
| try { | ||
| const block = await gateway.getRawBlock(cid, options) | ||
| const block = await gateway.getRawBlock(cid, { ...options, provider: options.provider }) |
Member
There was a problem hiding this comment.
Suggested change
| const block = await gateway.getRawBlock(cid, { ...options, provider: options.provider }) | |
| const block = await gateway.getRawBlock(cid, options) |
| /** | ||
| * By default we will only connect to peers with HTTPS addresses, pass true | ||
| * to also connect to HTTP addresses. | ||
| * to also connect to HTTP addresses. |
Member
There was a problem hiding this comment.
Please don't change lines unnecessarily.
achingbrain
requested changes
Oct 8, 2025
Member
achingbrain
left a comment
There was a problem hiding this comment.
Thanks for opening this.
Please address all comments and add tests to prevent regressions.
It cannot be merged without tests.
| * @default 2_097_152 (2MiB) | ||
| */ | ||
| maxSize?: number | ||
| provider?: string |
Member
There was a problem hiding this comment.
This should be providers?: string[] to better align with the option added in #834
Please also add a jsdoc comment explaining what this option does.
| gwUrl.pathname = `/ipfs/${cid.toString()}` | ||
|
|
||
| // necessary as not every gateway supports dag-cbor, but every should support | ||
| // sending raw block as-is |
| * @default 2_097_152 | ||
| */ | ||
| maxSize?: number | ||
| provider?: string |
Member
There was a problem hiding this comment.
This should be providers?: string[] to better align with the option added in #834
Please also add a jsdoc comment explaining what this option does.
Member
|
I'm converting this to a draft as it's blocked on ipfs/specs#504 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ensure the
provideroption is correctly propagated from the API, through the session and broker layers, down to the trustless gateway HTTP request.Fixes #816