This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
default ws note #10014
Closed
Closed
default ws note #10014
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
85dda1d
defalut ws note
nuke-web3 28fa065
Update client/cli/src/commands/run_cmd.rs
nuke-web3 7daf30d
Update client/cli/src/commands/run_cmd.rs
nuke-web3 da1cdd0
Use CLI default for ws-max-connections
adoerr 77b8e4a
cargo fmt
adoerr 2aabcb3
Merge branch 'master' into NukeManDan-patch-2
adoerr 7b6d2ff
No usize::MAX
adoerr 569f634
Update bin/node/cli/benches/transaction_pool.rs
adoerr 9946d6a
Update client/cli/src/config.rs
adoerr 82d56a9
Update client/service/test/src/lib.rs
adoerr 163641b
Update client/cli/src/commands/run_cmd.rs
adoerr c096841
Update test-utils/test-runner/src/utils.rs
adoerr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -344,8 +344,8 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized { | |
/// Get the RPC websockets maximum connections (`None` if unlimited). | ||
/// | ||
/// By default this is `None`. | ||
fn rpc_ws_max_connections(&self) -> Result<Option<usize>> { | ||
Ok(None) | ||
fn rpc_ws_max_connections(&self) -> Result<usize> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The docs above are incorrect. |
||
Ok(usize::MAX) | ||
adoerr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
/// Get the RPC cors (`None` if disabled) | ||
|
@@ -598,7 +598,7 @@ pub fn generate_node_name() -> String { | |
let count = node_name.chars().count(); | ||
|
||
if count < NODE_NAME_MAX_LENGTH { | ||
return node_name | ||
return node_name; | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, please don't use
usize::MAX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be a sensible alternative? Use
usize::MIN
or rely on the Rust language default?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will 1024 be good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual default is
100
as implied by the default value for the CLI option.Regarding the review comment above, we are basically looking for something to use instead of
None
because we no longer use anOption<>
.