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(node): add feature flag for tcp/quic #630

Merged
merged 2 commits into from Aug 29, 2023

Conversation

aed900
Copy link
Contributor

@aed900 aed900 commented Aug 12, 2023

Added a feature flag to be able to toggle quic instead of the tcp default.

@reviewpad reviewpad bot added the Large Large sized PR label Aug 12, 2023
);
} else {
assert_eq!(
format!("/ip4/127.0.0.1/udp/11101/quic-v1/p2p/{}", peer_id),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production

if !cfg!(feature = "quic") {
assert_eq!(
format!("/ip4/127.0.0.1/tcp/11101/p2p/{}", peer_id),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
);
} else {
assert_eq!(
format!("/ip4/127.0.0.1/udp/11101/quic-v1/p2p/{}", peer_id),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
);
if !cfg!(feature = "quic") {
assert_eq!(
format!("/ip4/127.0.0.1/tcp/11101/p2p/{}", peer_id),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
sn_testnet/src/lib.rs Fixed Show fixed Hide fixed
@aed900 aed900 requested review from joshuef and b-zee August 12, 2023 19:23
@aed900 aed900 force-pushed the tcpquicfeatflag branch 2 times, most recently from 27fa316 to dc9e9c5 Compare August 15, 2023 18:13
sn_testnet/src/lib.rs Fixed Show fixed Hide fixed
let genesis_multi_addr = format!("/ip4/127.0.0.1/tcp/{:?}/p2p/{}", genesis_port, peer_id);
#[cfg(feature = "quic")]
let genesis_multi_addr = format!(
"/ip4/127.0.0.1/udp/{:?}/quic-v1/p2p/{}",

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
@aed900 aed900 marked this pull request as ready for review August 23, 2023 12:15
Copy link
Member

@RolandSherwin RolandSherwin left a comment

Choose a reason for hiding this comment

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

PR looks good to me!

@joshuef joshuef added this pull request to the merge queue Aug 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Aug 24, 2023
@joshuef
Copy link
Contributor

joshuef commented Aug 24, 2023

Nice one, thanks @aed900 ! 🙇

@joshuef joshuef added this pull request to the merge queue Aug 25, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Aug 25, 2023
Added a feature flag to be able to toggle quic instead of the tcp default.
Refactored code related to the "add feature flag for tcp/quic" commit for this PR.
@RolandSherwin RolandSherwin added this pull request to the merge queue Aug 29, 2023
Merged via the queue into maidsafe:main with commit 300dc94 Aug 29, 2023
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Large Large sized PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants