mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: raise fd limit of the binary (#668)
* raise fd limit of the binary * Remove tracing and return error * Ignore errors
This commit is contained in:
@ -28,6 +28,7 @@ tracing-futures = "0.2"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
|
||||
# io
|
||||
fdlimit = "0.2.1"
|
||||
walkdir = "2.3"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
|
||||
@ -8,6 +8,7 @@ use crate::{
|
||||
util::chainspec::{chain_spec_value_parser, ChainSpecification, Genesis},
|
||||
};
|
||||
use clap::{crate_version, Parser};
|
||||
use fdlimit::raise_fd_limit;
|
||||
use reth_consensus::BeaconConsensus;
|
||||
use reth_db::{
|
||||
cursor::DbCursorRO,
|
||||
@ -85,6 +86,10 @@ impl Command {
|
||||
/// Execute `node` command
|
||||
// TODO: RPC
|
||||
pub async fn execute(&self) -> eyre::Result<()> {
|
||||
// Raise the fd limit of the process.
|
||||
// Does not do anything on windows.
|
||||
raise_fd_limit();
|
||||
|
||||
let config: Config = confy::load_path(&self.config).unwrap_or_default();
|
||||
info!("reth {} starting", crate_version!());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user