Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,20 @@ const SIGNET_SEED_NODE_ADDRS: &[SocketAddr] = {
&[SIGNET_MINING_SERVER, BIP300_XYZ]
};

const FORKNET_SEED_NODE_ADDRS: &[SocketAddr] = {
// explorer.bip300.xyz
const BIP300_XYZ: SocketAddr = SocketAddr::new(
std::net::IpAddr::V4(std::net::Ipv4Addr::new(157, 180, 8, 224)),
4000 + THIS_SIDECHAIN as u16,
);
&[BIP300_XYZ]
};

const fn seed_node_addrs(network: Network) -> &'static [SocketAddr] {
match network {
Network::Signet => SIGNET_SEED_NODE_ADDRS,
Network::Regtest => &[],
Network::Forknet => FORKNET_SEED_NODE_ADDRS,
}
}

Expand Down
1 change: 1 addition & 0 deletions lib/net/peer/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub const fn magic_bytes(network: Network) -> MagicBytes {
match network {
Network::Regtest => (),
Network::Signet => b3 |= 0b0000_0001,
Network::Forknet => b3 |= 0b0000_0010,
}
[b0, b1, b2, b3]
}
Expand Down
1 change: 1 addition & 0 deletions lib/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ pub enum Network {
#[default]
Signet,
Regtest,
Forknet,
}

/// Semver-compatible version
Expand Down
Loading