pub struct Config {
pub bootnodes: Vec<TrustedPeer>,
pub stages: StageConfig,
pub prune: PruneConfig,
pub peers: PeersConfig,
pub sessions: SessionsConfig,
pub static_files: StaticFilesConfig,
}Expand description
Configuration for the reth node.
Fields§
§bootnodes: Vec<TrustedPeer>Nodes to bootstrap P2P discovery with, as enode:// URLs or enr: records.
Takes precedence over the chain spec bootnodes, and is overridden by --bootnodes.
stages: StageConfigConfiguration for each stage in the pipeline.
prune: PruneConfigConfiguration for pruning.
peers: PeersConfigConfiguration for the discovery service.
sessions: SessionsConfigConfiguration for peer sessions.
static_files: StaticFilesConfigConfiguration for static files.
Implementations§
Source§impl Config
impl Config
Sourcepub fn set_prune_config(&mut self, prune_config: PruneConfig)
pub fn set_prune_config(&mut self, prune_config: PruneConfig)
Sets the pruning configuration.
Source§impl Config
impl Config
Sourcepub fn from_path(path: impl AsRef<Path>) -> Result<Self>
Available on crate feature serde only.
pub fn from_path(path: impl AsRef<Path>) -> Result<Self>
serde only.Load a Config from a specified path.
A new configuration file is created with default values if none exists.
Sourcepub fn peers_config_with_basic_nodes_from_file(
&self,
peers_file: Option<&Path>,
) -> PeersConfig
Available on crate feature serde only.
pub fn peers_config_with_basic_nodes_from_file( &self, peers_file: Option<&Path>, ) -> PeersConfig
serde only.Returns the PeersConfig for the node.
If a peers file is provided, the basic nodes from the file are added to the configuration.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Config
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
impl<T> MaybeSerde for Twhere
T: Serialize + for<'de> Deserialize<'de>,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1192 bytes