Skip to content

Commit

Permalink
feat: remove goerli support
Browse files Browse the repository at this point in the history
  • Loading branch information
blombern committed Feb 19, 2024
1 parent bb49b23 commit 18f9cad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ impl<'de> Deserialize<'de> for Env {
#[derive(PartialEq, Deserialize)]
pub enum Network {
Mainnet,
Goerli,
Holesky,
}

impl fmt::Display for Network {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let str = match &self {
Network::Mainnet => "mainnet",
Network::Goerli => "goerli",
Network::Holesky => "holesky",
};
write!(f, "{}", str)
Expand All @@ -65,7 +63,7 @@ pub trait ToNetwork {
impl ToNetwork for Env {
fn to_network(&self) -> Network {
match *self {
Env::Stag => Network::Goerli,
Env::Stag => Network::Holesky,
Env::Prod => Network::Mainnet,
}
}
Expand All @@ -78,7 +76,7 @@ where
let s: String = Deserialize::deserialize(deserializer)?;
match s.as_ref() {
"mainnet" => Ok(Network::Mainnet),
"goerli" => Ok(Network::Goerli),
"holesky" => Ok(Network::Holesky),
_ => Err(Error::custom("network present but not mainnet or goerli")),
}
}
Expand All @@ -90,7 +88,7 @@ pub trait ToBeaconExplorerUrl {
impl ToBeaconExplorerUrl for Env {
fn to_beacon_explorer_url(&self) -> String {
match *self {
Env::Stag => "https://goerli.beaconcha.in",
Env::Stag => "https://holesky.beaconcha.in",
Env::Prod => "https://beaconcha.in",
}
.to_string()
Expand Down
1 change: 0 additions & 1 deletion src/phoenix/inclusion_monitor/loki_client/slot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ lazy_static! {
static ref GENESIS_TIMESTAMP: DateTime<Utc> = {
match APP_CONFIG.network {
Network::Mainnet => "2020-12-01T12:00:23Z".parse().unwrap(),
Network::Goerli => "2021-03-23T14:00:00Z".parse().unwrap(),
Network::Holesky => "2023-09-28T12:00:00Z".parse().unwrap(),
}
};
Expand Down

0 comments on commit 18f9cad

Please sign in to comment.