Skip to content

Commit

Permalink
style: "standardize case in pallaschainobserver error messages"
Browse files Browse the repository at this point in the history
- correct the case in error messages from "pallaschainobserver failed to acquire statequery" to "pallaschainobserver failed to acquire statequery"
- adjust the case in error message from "pallaschainobserver failed to get current era" to "pallaschainobserver failed to get current era"
- alter the case in error message from "pallaschainobserver failed to get block epoch number" to "pallaschainobserver failed to get block epoch number"
  • Loading branch information
falcucci committed Jan 5, 2024
1 parent 4d538a9 commit 344e6dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mithril-common/src/chain_observer/pallas_observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ impl PallasChainObserver {
.acquire(None)
.await
.map_err(|err| anyhow!(err))
.with_context(|| "PallasChainObserver Failed to acquire statequery")?;
.with_context(|| "PallasChainObserver failed to acquire statequery")?;

let era = queries_v16::get_current_era(statequery)
.await
.map_err(|err| anyhow!(err))
.with_context(|| "PallasChainObserver Failed to get current era")?;
.with_context(|| "PallasChainObserver failed to get current era")?;

let epoch = queries_v16::get_block_epoch_number(statequery, era)
.await
.map_err(|err| anyhow!(err))
.with_context(|| "PallasChainObserver Failed to get block epoch number")?;
.with_context(|| "PallasChainObserver failed to get block epoch number")?;

Ok(epoch)
}
Expand Down

0 comments on commit 344e6dd

Please sign in to comment.