Skip to content

Commit

Permalink
Eth2-to-Near-relay: don't panic on running (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
olga24912 authored Sep 22, 2022
1 parent 5a5cd65 commit 832148a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions eth2near/eth2near-block-relay-rs/src/eth2near_relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,16 @@ impl Eth2NearRelay {
were_submission_on_iter = true;
}

let last_finalized_slot_on_near: u64 = return_on_fail!(
let last_finalized_slot_on_near: u64 = skip_fail!(
self.eth_client_contract.get_finalized_beacon_block_slot(),
"Error on getting finalized block hash. Skipping sending light client update"
);
let last_finalized_slot_on_eth: u64 = return_on_fail!(self
"Error on getting finalized block hash. Skipping sending light client update",
self.sleep_time_on_sync_secs);

let last_finalized_slot_on_eth: u64 = skip_fail!(self
.beacon_rpc_client
.get_last_finalized_slot_number(),
"Error on getting last finalized slot number on Ethereum. Skipping sending light client update").as_u64();
"Error on getting last finalized slot number on Ethereum. Skipping sending light client update",
self.sleep_time_on_sync_secs).as_u64();

LAST_FINALIZED_ETH_SLOT_ON_NEAR
.inc_by(last_finalized_slot_on_near as i64 - LAST_FINALIZED_ETH_SLOT_ON_NEAR.get());
Expand Down

0 comments on commit 832148a

Please sign in to comment.