mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: adding a new method to network config builder (#11569)
This commit is contained in:
@ -347,6 +347,18 @@ impl NetworkConfigBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the discovery port to an unused port.
|
||||
/// This is useful for testing.
|
||||
pub fn with_unused_discovery_port(self) -> Self {
|
||||
self.discovery_port(0)
|
||||
}
|
||||
|
||||
/// Sets the listener port to an unused port.
|
||||
/// This is useful for testing.
|
||||
pub fn with_unused_listener_port(self) -> Self {
|
||||
self.listener_port(0)
|
||||
}
|
||||
|
||||
/// Sets the external ip resolver to use for discovery v4.
|
||||
///
|
||||
/// If no [`Discv4ConfigBuilder`] is set via [`Self::discovery`], this will create a new one.
|
||||
|
||||
Reference in New Issue
Block a user