mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
chore: make networkconfig builder setup nicer (#8496)
This commit is contained in:
@@ -206,6 +206,14 @@ impl NetworkConfigBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
/// Apply a function to the builder.
|
||||
pub fn apply<F>(self, f: F) -> Self
|
||||
where
|
||||
F: FnOnce(Self) -> Self,
|
||||
{
|
||||
f(self)
|
||||
}
|
||||
|
||||
/// Returns the configured [`PeerId`]
|
||||
pub fn get_peer_id(&self) -> PeerId {
|
||||
pk2id(&self.secret_key.public_key(SECP256K1))
|
||||
@@ -268,6 +276,7 @@ impl NetworkConfigBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
/// Configures the transactions manager with the given config.
|
||||
pub const fn transactions_manager_config(mut self, config: TransactionsManagerConfig) -> Self {
|
||||
self.transactions_manager_config = config;
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user