Skip to content

Commit 33fc9fe

Browse files
authored
Merge pull request #764 from input-output-hk/greg/warn_epoch_error
add warning when event can not send epoch
2 parents 7418fb7 + 4c9e016 commit 33fc9fe

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mithril-aggregator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.2.21"
3+
version = "0.2.22"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-aggregator/src/http_server/routes/signer_routes.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,13 @@ mod handlers {
5959
Some(version) => vec![("signer-node-version", version)],
6060
None => Vec::new(),
6161
};
62-
let epoch_str = if let Ok(beacon) = beacon_provider.get_current_beacon().await {
63-
format!("{}", beacon.epoch)
64-
} else {
65-
String::new()
62+
let epoch_str = match beacon_provider.get_current_beacon().await {
63+
Ok(beacon) => format!("{}", beacon.epoch),
64+
Err(e) => {
65+
warn!("Could not read beacon to add in event: {e}");
66+
67+
String::new()
68+
}
6669
};
6770

6871
if epoch_str.is_empty() {

0 commit comments

Comments
 (0)