feat: add helper to disable discovery (#19478)

This commit is contained in:
Matthias Seitz
2025-11-04 09:51:33 +01:00
committed by GitHub
parent a311423292
commit f3cf8d5e10

View File

@@ -427,6 +427,12 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
self
}
/// Disables all discovery services for the node.
pub const fn with_disabled_discovery(mut self) -> Self {
self.network.discovery.disable_discovery = true;
self
}
/// Effectively disables the RPC state cache by setting the cache sizes to `0`.
///
/// By setting the cache sizes to 0, caching of newly executed or fetched blocks will be