Skip to content

Commit

Permalink
feat(fortuna): More info on reveal errors (#1568)
Browse files Browse the repository at this point in the history
  • Loading branch information
m30m authored May 13, 2024
1 parent ae8fab1 commit fd192f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/fortuna/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/fortuna/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fortuna"
version = "5.2.3"
version = "5.2.4"
edition = "2021"

[dependencies]
Expand Down
9 changes: 7 additions & 2 deletions apps/fortuna/src/api/revelation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub async fn revelation(

let (maybe_request, current_block_number) =
try_join!(maybe_request_fut, current_block_number_fut).map_err(|e| {
tracing::error!("RPC request failed {}", e);
tracing::error!(chain_id = chain_id, "RPC request failed {}", e);
RestError::TemporarilyUnavailable
})?;

Expand All @@ -77,7 +77,12 @@ pub async fn revelation(
if current_block_number.saturating_sub(state.reveal_delay_blocks) >= r.block_number =>
{
let value = &state.state.reveal(sequence).map_err(|e| {
tracing::error!("Reveal failed {}", e);
tracing::error!(
chain_id = chain_id,
sequence = sequence,
"Reveal failed {}",
e
);
RestError::Unknown
})?;
let encoded_value = Blob::new(encoding.unwrap_or(BinaryEncoding::Hex), value.clone());
Expand Down

0 comments on commit fd192f1

Please sign in to comment.