From d8600d621e50aac239632e472028ffd663b1a0d1 Mon Sep 17 00:00:00 2001 From: Stanislav Tkach Date: Tue, 17 Dec 2024 13:16:31 +0100 Subject: [PATCH] Update mithril-client version (0.8.18 -> 0.10.4) --- rust/cardano-chain-follower/Cargo.toml | 3 +-- .../src/mithril_snapshot_config.rs | 14 +++++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/rust/cardano-chain-follower/Cargo.toml b/rust/cardano-chain-follower/Cargo.toml index fb1c3a1e682..07782e7e1b2 100644 --- a/rust/cardano-chain-follower/Cargo.toml +++ b/rust/cardano-chain-follower/Cargo.toml @@ -15,8 +15,7 @@ pallas = { version = "0.30.1", git = "https://github.com/input-output-hk/catalys pallas-hardano = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" } pallas-crypto = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" } -# cspell: words licence -mithril-client = { version = "0.8.18", default-features = false, features = [ +mithril-client = { version = "0.10.4", default-features = false, features = [ "full", "num-integer-backend", ] } diff --git a/rust/cardano-chain-follower/src/mithril_snapshot_config.rs b/rust/cardano-chain-follower/src/mithril_snapshot_config.rs index b317d9a6f91..3eea1111c21 100644 --- a/rust/cardano-chain-follower/src/mithril_snapshot_config.rs +++ b/rust/cardano-chain-follower/src/mithril_snapshot_config.rs @@ -359,15 +359,11 @@ impl MithrilSnapshotConfig { .map_err(|e| Error::MithrilClient(self.chain, url.clone(), e))?; // Check we have a snapshot, and its for our network. - match snapshots.first() { - Some(snapshot) => { - let _aggregator_network = - Network::from_str(&snapshot.beacon.network).map_err(|_err| { - Error::MithrilClientNetworkMismatch( - self.chain, - snapshot.beacon.network.clone(), - ) - })?; + match snapshots.first().and_then(|s| s.beacon.network.as_ref()) { + Some(network) => { + let _aggregator_network = Network::from_str(network.as_str()).map_err(|_err| { + Error::MithrilClientNetworkMismatch(self.chain, network.clone()) + })?; }, None => return Err(Error::MithrilClientNoSnapshots(self.chain, url)), }