Skip to content

Commit

Permalink
chore: fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeRosa committed May 26, 2024
1 parent e7a47e9 commit ca2871a
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions catalyst-gateway/bin/src/cardano/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,29 +196,31 @@ async fn process_blocks(

loop {
match follower.next().await {
Ok(chain_update) => match chain_update {
ChainUpdate::Block(data) => {
if blocks_tx.send(data).await.is_err() {
error!("Block indexing task not running");
break;
};
},
ChainUpdate::Rollback(data) => {
let block = match data.decode() {
Ok(block) => block,
Err(err) => {
error!("Unable to decode {network:?} block {err} - skip..");
continue;
},
};

info!(
"Rollback block NUMBER={} SLOT={} HASH={}",
block.number(),
block.slot(),
hex::encode(block.hash()),
);
},
Ok(chain_update) => {
match chain_update {
ChainUpdate::Block(data) => {
if blocks_tx.send(data).await.is_err() {
error!("Block indexing task not running");
break;
};
},
ChainUpdate::Rollback(data) => {
let block = match data.decode() {
Ok(block) => block,
Err(err) => {
error!("Unable to decode {network:?} block {err} - skip..");
continue;
},
};

info!(
"Rollback block NUMBER={} SLOT={} HASH={}",
block.number(),
block.slot(),
hex::encode(block.hash()),
);
},
}
},
Err(err) => {
error!(
Expand Down

0 comments on commit ca2871a

Please sign in to comment.