Skip to content

Commit ac87b08

Browse files
committed
Update network profile documentation and change enum visibility for clarity
1 parent 72df790 commit ac87b08

1 file changed

Lines changed: 5 additions & 18 deletions

File tree

crates/node/src/config.rs

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ const DEFAULT_ZMQ_HWM: u32 = 1_000;
1919
const DRYNET4_CONNECT: &str = "drynet4.drivechain.dev:8533";
2020
const DRYNET4_P2P_MAGIC: [u8; 4] = [0xec, 0xa5, 0xd4, 0x04];
2121

22-
/// A complete built-in node network profile.
22+
/// A complete built-in node network selection.
2323
///
24-
/// Unlike [`Network`], which selects consensus rules, a preset also selects
25-
/// P2P bootstrap behavior. Low-level settings in the same or a later
26-
/// configuration layer may explicitly override the preset.
24+
/// Unlike [`Network`], which selects consensus rules, this also selects P2P
25+
/// bootstrap behavior. Low-level settings in the same or a later configuration
26+
/// layer may explicitly override the network-derived defaults.
2727
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize)]
2828
#[serde(rename_all = "lowercase")]
29-
enum NetworkSelection {
29+
pub(crate) enum NetworkSelection {
3030
/// Bitcoin mainnet.
3131
Mainnet,
3232
/// Legacy Bitcoin testnet.
@@ -994,19 +994,6 @@ where
994994
parse_network(&raw).map_err(serde::de::Error::custom)
995995
}
996996

997-
fn deserialize_optional_network<'de, D>(
998-
deserializer: D,
999-
) -> core::result::Result<Option<Network>, D::Error>
1000-
where
1001-
D: serde::Deserializer<'de>,
1002-
{
1003-
let raw = Option::<String>::deserialize(deserializer)?;
1004-
raw.as_deref()
1005-
.map(parse_network)
1006-
.transpose()
1007-
.map_err(serde::de::Error::custom)
1008-
}
1009-
1010997
fn deserialize_optional_p2p_magic<'de, D>(
1011998
deserializer: D,
1012999
) -> core::result::Result<Option<[u8; 4]>, D::Error>

0 commit comments

Comments
 (0)