Skip to content

Commit 0fb7fc2

Browse files
committed
Add support for forknet
1 parent cab8d85 commit 0fb7fc2

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

lib/net/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,20 @@ const SIGNET_SEED_NODE_ADDRS: &[SocketAddr] = {
165165
&[SIGNET_MINING_SERVER, BIP300_XYZ]
166166
};
167167

168+
const FORKNET_SEED_NODE_ADDRS: &[SocketAddr] = {
169+
// explorer.bip300.xyz
170+
const BIP300_XYZ: SocketAddr = SocketAddr::new(
171+
std::net::IpAddr::V4(std::net::Ipv4Addr::new(157, 180, 8, 224)),
172+
4000 + THIS_SIDECHAIN as u16,
173+
);
174+
&[BIP300_XYZ]
175+
};
176+
168177
const fn seed_node_addrs(network: Network) -> &'static [SocketAddr] {
169178
match network {
170179
Network::Signet => SIGNET_SEED_NODE_ADDRS,
171180
Network::Regtest => &[],
181+
Network::Forknet => FORKNET_SEED_NODE_ADDRS,
172182
}
173183
}
174184

lib/net/peer/message.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub const fn magic_bytes(network: Network) -> MagicBytes {
2626
match network {
2727
Network::Regtest => (),
2828
Network::Signet => b3 |= 0b0000_0001,
29+
Network::Forknet => b3 |= 0b0000_0010,
2930
}
3031
[b0, b1, b2, b3]
3132
}

lib/types/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,7 @@ pub enum Network {
856856
#[default]
857857
Signet,
858858
Regtest,
859+
Forknet,
859860
}
860861

861862
/// Semver-compatible version

0 commit comments

Comments
 (0)