From bacedcecc51d4f8be610c6a1f4c1d0643faf8146 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 11 Apr 2022 19:09:48 +0300 Subject: [WIP] more spring cleaning --- src/handlers.rs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/handlers.rs') diff --git a/src/handlers.rs b/src/handlers.rs index 8d8b62f..a64c012 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -37,8 +37,6 @@ const TX_UPPER_LIMIT: u16 = 10; const TX_LOWER_LIMIT: u16 = 1; // Transaction traffic reward const TX_TRAFFIC_REWARD: u16 = 1; -// Staking reward -const STAKING_REWARD: f64 = 0.1; // Percentage // Encryption primitive type Aes128Cbc = Cbc; @@ -564,7 +562,6 @@ pub async fn propose_block( if let Some(transaction) = pending_transactions.remove(fingerprint) { let source = &transaction.source; let target = &transaction.target; - let is_source_bot = users_store.get(source).unwrap().is_bot; if let Some(from) = users_store.get_mut(source) { from.balance -= transaction.amount - TX_TRAFFIC_REWARD; @@ -572,12 +569,6 @@ pub async fn propose_block( if let Some(to) = users_store.get_mut(target) { to.balance += transaction.amount; - if is_source_bot { - // Add staking reward - to.balance += - math::round::ceil((f64::from(transaction.amount)) * STAKING_REWARD, 0) - as u16; - } } // if the receiver is a bot, they will reciprocate -- cgit v1.2.3-70-g09d2