diff --git a/catalyst-gateway/bin/src/cardano/mod.rs b/catalyst-gateway/bin/src/cardano/mod.rs index 557a9574bb5..b5de223e332 100644 --- a/catalyst-gateway/bin/src/cardano/mod.rs +++ b/catalyst-gateway/bin/src/cardano/mod.rs @@ -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!( diff --git a/catalyst-gateway/bin/src/event_db/cardano/cip36_registration/mod.rs b/catalyst-gateway/bin/src/event_db/cardano/cip36_registration/mod.rs index 63de98a8296..b2a71d9c7c0 100644 --- a/catalyst-gateway/bin/src/event_db/cardano/cip36_registration/mod.rs +++ b/catalyst-gateway/bin/src/event_db/cardano/cip36_registration/mod.rs @@ -191,10 +191,11 @@ impl EventDB { let conn = self.pool.get().await?; let rows = conn - .query( - SELECT_VOTER_REGISTRATION_SQL, - &[&stake_credential, &network.to_string(), &slot_num], - ) + .query(SELECT_VOTER_REGISTRATION_SQL, &[ + &stake_credential, + &network.to_string(), + &slot_num, + ]) .await?; let row = rows.first().ok_or(NotFoundError)?;