Skip to content

Commit ef7261f

Browse files
Update mithril-client version (0.8.18 -> 0.10.4) (#110)
1 parent 0aeadb9 commit ef7261f

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

rust/cardano-chain-follower/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ pallas = { version = "0.30.1", git = "https://github.com/input-output-hk/catalys
1515
pallas-hardano = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" }
1616
pallas-crypto = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" }
1717

18-
# cspell: words licence
19-
mithril-client = { version = "0.8.18", default-features = false, features = [
18+
mithril-client = { version = "0.10.4", default-features = false, features = [
2019
"full",
2120
"num-integer-backend",
2221
] }

rust/cardano-chain-follower/src/mithril_snapshot_config.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -359,15 +359,11 @@ impl MithrilSnapshotConfig {
359359
.map_err(|e| Error::MithrilClient(self.chain, url.clone(), e))?;
360360

361361
// Check we have a snapshot, and its for our network.
362-
match snapshots.first() {
363-
Some(snapshot) => {
364-
let _aggregator_network =
365-
Network::from_str(&snapshot.beacon.network).map_err(|_err| {
366-
Error::MithrilClientNetworkMismatch(
367-
self.chain,
368-
snapshot.beacon.network.clone(),
369-
)
370-
})?;
362+
match snapshots.first().and_then(|s| s.beacon.network.as_ref()) {
363+
Some(network) => {
364+
let _aggregator_network = Network::from_str(network.as_str()).map_err(|_err| {
365+
Error::MithrilClientNetworkMismatch(self.chain, network.clone())
366+
})?;
371367
},
372368
None => return Err(Error::MithrilClientNoSnapshots(self.chain, url)),
373369
}

0 commit comments

Comments
 (0)