Skip to content

Commit

Permalink
use proper type of manifest server
Browse files Browse the repository at this point in the history
  • Loading branch information
hanabi1224 committed Oct 9, 2024
1 parent 2e06de5 commit e165f00
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/networks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ pub struct ChainConfig {
pub fip0081_ramp_duration_epochs: u64,
pub f3_bootstrap_epoch: i64,
pub f3_initial_power_table: Cid,
pub f3_mainfest_server: Option<Cid>,
#[cfg_attr(test, arbitrary(gen(|_| Some(libp2p::PeerId::random()))))]
pub f3_mainfest_server: Option<libp2p::PeerId>,
}

impl ChainConfig {
Expand All @@ -257,7 +258,7 @@ impl ChainConfig {
f3_mainfest_server: Some(
"12D3KooWENMwUF9YxvQxar7uBWJtZkA6amvK4xWmKXfSiHUo2Qq7"
.parse()
.expect("Invalid CID"),
.expect("Invalid PeerId"),
),
}
}
Expand Down Expand Up @@ -285,7 +286,7 @@ impl ChainConfig {
f3_mainfest_server: Some(
"12D3KooWS9vD9uwm8u2uPyJV32QBAhKAmPYwmziAgr3Xzk2FU1Mr"
.parse()
.expect("Invalid CID"),
.expect("Invalid PeerId"),
),
}
}
Expand Down Expand Up @@ -337,7 +338,7 @@ impl ChainConfig {
f3_mainfest_server: Some(
"12D3KooWJr9jy4ngtJNR7JC1xgLFra3DjEtyxskRYWvBK9TC3Yn6"
.parse()
.expect("Invalid CID"),
.expect("Invalid PeerId"),
),
}
}
Expand Down Expand Up @@ -633,4 +634,12 @@ mod tests {
"dummydevnet"
);
}

#[test]
fn chain_config() {
ChainConfig::mainnet();
ChainConfig::calibnet();
ChainConfig::devnet();
ChainConfig::butterflynet();
}
}

0 comments on commit e165f00

Please sign in to comment.