Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: custom protocol name #962

Merged
merged 13 commits into from
Aug 13, 2021

Conversation

greenSnot
Copy link
Contributor

No description provided.

doc/CONFIGURATION.md Outdated Show resolved Hide resolved
src/ping/constants.js Outdated Show resolved Hide resolved
Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this support. I left a couple of suggestions to get this to the finish line

doc/CONFIGURATION.md Outdated Show resolved Hide resolved
doc/CONFIGURATION.md Outdated Show resolved Hide resolved
doc/CONFIGURATION.md Outdated Show resolved Hide resolved
src/identify/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, looks much cleaner now!
We should just add a test file in https://github.com/libp2p/js-libp2p/tree/master/test/configuration where we configure a different prefix and verify if node.peerStore.protoBook.get(node.peerId) contains the expected protocols

Copy link
Contributor Author

@greenSnot greenSnot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@vasco-santos
Copy link
Member

@greenSnot there is still one issue that we need to solve. The linting job is failing with the following errors

/home/runner/work/js-libp2p/js-libp2p/src/identify/consts.js:15:67: Newline required at end of file but not found. [Error/eol-last]
/home/runner/work/js-libp2p/js-libp2p/src/identify/index.js:49:24: Missing space before function parentheses. [Error/space-before-function-paren]
/home/runner/work/js-libp2p/js-libp2p/src/identify/index.js:52:154: Unexpected trailing comma. [Error/comma-dangle]

/home/runner/work/js-libp2p/js-libp2p/src/ping/constants.js:7:24: Unexpected trailing comma. [Error/comma-dangle]
/home/runner/work/js-libp2p/js-libp2p/src/ping/index.js:33:19: Multiple spaces found before '`/${'. [Error/no-multi-spaces]
/home/runner/work/js-libp2p/js-libp2p/src/ping/index.js:33:91: Extra semicolon. [Error/semi]

/home/runner/work/js-libp2p/js-libp2p/test/configuration/protocol-prefix.node.js:17:37: Unexpected trailing comma. [Error/comma-dangle]

You can run npm run lint to run it locally.

@vasco-santos
Copy link
Member

@greenSnot apologies, but you will need to rebase this PR. We had an issue in CI that I saw in this PR and I already fixed it in #963 but now we need a rebase to get this fixed here and get CI jobs green

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for getting this to the finish line

@vasco-santos vasco-santos merged commit ef24fab into libp2p:master Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants