Shared reference to conversion rate metric value (#1034)

* shared conversion rate metric value

* clippy
This commit is contained in:
Svyatoslav Nikolsky
2021-06-29 14:24:54 +03:00
committed by Bastian Köcher
parent db0216dabb
commit ecd20d9d24
23 changed files with 260 additions and 161 deletions
@@ -355,7 +355,7 @@ async fn run_single_transaction_relay(params: EthereumExchangeParams, eth_tx_has
async fn run_auto_transactions_relay_loop(
params: EthereumExchangeParams,
eth_start_with_block_number: Option<u64>,
) -> Result<(), String> {
) -> anyhow::Result<()> {
let EthereumExchangeParams {
eth_params,
sub_params,
@@ -375,7 +375,7 @@ async fn run_auto_transactions_relay_loop(
.best_ethereum_finalized_block()
.await
.map_err(|err| {
format!(
anyhow::format_err!(
"Error retrieving best finalized Ethereum block from Substrate node: {:?}",
err
)
@@ -292,7 +292,7 @@ pub async fn run(params: EthereumSyncParams) -> Result<(), RpcError> {
futures::future::pending(),
)
.await
.map_err(RpcError::SyncLoop)?;
.map_err(|e| RpcError::SyncLoop(e.to_string()))?;
Ok(())
}
@@ -194,7 +194,7 @@ pub async fn run(params: SubstrateSyncParams) -> Result<(), RpcError> {
futures::future::pending(),
)
.await
.map_err(RpcError::SyncLoop)?;
.map_err(|e| RpcError::SyncLoop(e.to_string()))?;
Ok(())
}