diff --git a/slasher/Cargo.toml b/slasher/Cargo.toml index 045162f..aa2a622 100644 --- a/slasher/Cargo.toml +++ b/slasher/Cargo.toml @@ -14,4 +14,8 @@ matching_engine_helpers = { path = "../matching_engine", package = "matching_eng reqwest = { version = "0.12.4", features = ["json"] } serde = { version = "1.0.178", features = ["derive"] } serde_json = "1.0.104" -tokio = { version = "1.15.0", features = ["full"] } \ No newline at end of file +tokio = { version = "1.15.0", features = ["full"] } + +[features] +default = [] +force_transactions = [] \ No newline at end of file diff --git a/slasher/src/main.rs b/slasher/src/main.rs index c6b2edb..342cad5 100644 --- a/slasher/src/main.rs +++ b/slasher/src/main.rs @@ -138,11 +138,15 @@ impl SlashingInstance { let ask_state = matching_engine_helpers::ask_lib::ask_status::get_ask_state(ask_state); - if ask_state == AskState::DeadlineCrossed { - let slashing_transaction = self + if ask_state == AskState::DeadlineCrossed || ask_state == AskState::Assigned { + let mut slashing_transaction = self .proof_marketplace .slash_generator(ask_id, self.reward_address); + 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), Err(err) => {