Skip to content

Commit

Permalink
Remove mutable binding
Browse files Browse the repository at this point in the history
  • Loading branch information
sug0 authored and james-chf committed Oct 6, 2022
1 parent 1f75022 commit d71088e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apps/src/lib/node/ledger/ethereum_node/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,12 @@ async fn run_oracle_aux(oracle: Oracle) {
// Initialize our local state. This includes
// the latest block height seen and a queue of events
// awaiting a certain number of confirmations
let mut latest_block;
let mut pending: Vec<PendingEvent> = Vec::new();
const SLEEP_DUR: std::time::Duration = std::time::Duration::from_secs(1);
loop {
tokio::time::sleep(SLEEP_DUR).await;
// update the latest block height
latest_block = loop {
let latest_block = loop {
match oracle.eth_block_number().await {
Ok(height) => break height,
Err(error) => {
Expand Down

0 comments on commit d71088e

Please sign in to comment.