Conversation
DiegoRBaquero
approved these changes
Feb 1, 2024
guanzo
reviewed
Feb 1, 2024
guanzo
approved these changes
Feb 2, 2024
hannahhoward
requested changes
Feb 6, 2024
|
|
||
| knownPeerList.forEach((peer, idx) => { | ||
| const { peerID, multiaddr, protocol } = peer; | ||
| if (!peerID || !multiaddr || !protocol) { |
Contributor
There was a problem hiding this comment.
if multiaddr starts with http, peerID and protocol do not need to be set
Contributor
|
@AmeanAsad the lassie version is 0.22.0 |
hannahhoward
approved these changes
Feb 8, 2024
guanzo
reviewed
Feb 9, 2024
guanzo
reviewed
Feb 9, 2024
| knownPeerList.forEach((peer, idx) => { | ||
| const { peerID, multiaddr, protocol } = peer; | ||
|
|
||
| if (multiaddr && multiaddr.startsWith("http")) { |
Collaborator
There was a problem hiding this comment.
Should this be checking multiaddr or protocol for http?
The peer structure i'm working with is
"knownPeers": {
"web3.storage": [
{
"peerID": "QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp",
"protocol": "http",
"multiaddr": "/dns4/dag.w3s.link/tcp/443/https"
}
]
},
Collaborator
There was a problem hiding this comment.
The final url with the current logic will result in "/dns4/dag.w3s.link/tcp/443/https/p2p/QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp+http" which seems off.
Contributor
Author
There was a problem hiding this comment.
According to @hannahhoward's description, we pass the raw multiaddr only if the actual multiaddr starts with http
Co-authored-by: Eric Guan <guanzo91@gmail.com> Signed-off-by: Amean Asad <amean.asad1999@gmail.com>
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.
Changes