From 58e27c1274d2da221559a07603b3ded49404e170 Mon Sep 17 00:00:00 2001 From: Hardhat Chad Date: Tue, 24 Sep 2024 05:55:15 +0000 Subject: [PATCH] skip duplicate boost --- api/src/error.rs | 2 -- program/src/mine.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/api/src/error.rs b/api/src/error.rs index a020481..33fdb75 100644 --- a/api/src/error.rs +++ b/api/src/error.rs @@ -19,8 +19,6 @@ pub enum OreError { MaxSupply = 6, #[error("The proof does not match the expected account")] AuthFailed = 7, - #[error("The same boost cannot be applied twice")] - DuplicateBoost = 8, } error!(OreError); diff --git a/program/src/mine.rs b/program/src/mine.rs index 665614e..7e1ee25 100644 --- a/program/src/mine.rs +++ b/program/src/mine.rs @@ -106,8 +106,6 @@ pub fn process_mine(accounts: &[AccountInfo], data: &[u8]) -> ProgramResult { // If user has greater than or equal to the max stake on the network, they receive 2x multiplier. // Any stake less than this will receives between 1x and 2x multipler. The multipler is only active // if the miner's last stake deposit was more than one minute ago to protect against flash loan attacks. - let mut bus_data = bus_info.data.borrow_mut(); - let bus = Bus::try_from_bytes_mut(&mut bus_data)?; if proof.balance.gt(&0) && proof.last_stake_at.saturating_add(ONE_MINUTE).lt(&t) { // Calculate staking reward. if config.top_balance.gt(&0) {