From b39fc760a60520732192e7d8e166a3dac2738970 Mon Sep 17 00:00:00 2001 From: Akshay Date: Tue, 12 Nov 2024 14:19:06 +0000 Subject: [PATCH] fix error log in slasher --- slasher/src/main.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/slasher/src/main.rs b/slasher/src/main.rs index 342cad5..c63569e 100644 --- a/slasher/src/main.rs +++ b/slasher/src/main.rs @@ -122,14 +122,16 @@ impl SlashingInstance { ); let ask_id = match U256::from_dec_str(&active_request.ask_id) { Ok(data) => data, - _ => { + Err(err) => { + log::error!("{}", err.to_string()); log::error!("Invalid Ask ID received"); continue; } }; let ask_state = match self.proof_marketplace.get_ask_state(ask_id).await { Ok(data) => data, - _ => { + Err(err) => { + log::error!("{}", err.to_string()); log::error!("Failed Fetching Ask State"); continue; } @@ -143,9 +145,9 @@ impl SlashingInstance { .proof_marketplace .slash_generator(ask_id, self.reward_address); - if cfg!(feature = "force_transactions") { - slashing_transaction = slashing_transaction.gas(10_000_000); - } + if cfg!(feature = "force_transactions") { + slashing_transaction = slashing_transaction.gas(10_000_000); + } let slashing_transaction = match slashing_transaction.send().await { Ok(data) => data.confirmations(10), @@ -158,7 +160,8 @@ impl SlashingInstance { let slashing_transaction = match slashing_transaction.await { Ok(data) => data, - _ => { + Err(err) => { + log::error!("{}", err.to_string()); log::error!("Failed broadcasting transaction"); continue; }