diff --git a/src/main.rs b/src/main.rs index 33c04aa..0043211 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,7 +60,9 @@ async fn main() { postgres.start_saving_transaction(map_of_infos.clone(), slot.clone()); while let Some(message) = stream.next().await { - let message = message.unwrap(); + let Ok(message) = message else { + continue; + }; let Some(update) = message.update_oneof else { continue; @@ -69,9 +71,6 @@ async fn main() { match update { UpdateOneof::BankingTransactionErrors(transaction) => { log::info!("got banking stage transaction erros"); - if transaction.error.is_none() { - continue; - } let sig = transaction.signature.to_string(); match map_of_infos.get_mut(&sig) { Some(mut x) => { diff --git a/src/postgres.rs b/src/postgres.rs index d9ecc05..e3e64f2 100644 --- a/src/postgres.rs +++ b/src/postgres.rs @@ -83,7 +83,7 @@ impl PostgresSession { if txs.is_empty() { return Ok(()); } - const NUMBER_OF_ARGS: usize = 10; + const NUMBER_OF_ARGS: usize = 11; let mut args: Vec<&(dyn ToSql + Sync)> = Vec::with_capacity(NUMBER_OF_ARGS * txs.len()); let txs: Vec = txs