From 92e88b1b7554635c5c2a771af4e67223a9d21273 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Mon, 13 May 2019 17:18:42 +1000 Subject: [PATCH] spec: apply_rewards tweaks --- .../src/per_epoch_processing/apply_rewards.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/eth2/state_processing/src/per_epoch_processing/apply_rewards.rs b/eth2/state_processing/src/per_epoch_processing/apply_rewards.rs index bc02b67a33..2ae35f976b 100644 --- a/eth2/state_processing/src/per_epoch_processing/apply_rewards.rs +++ b/eth2/state_processing/src/per_epoch_processing/apply_rewards.rs @@ -1,7 +1,3 @@ -use super::common::{ - get_attesting_balance, get_matching_head_attestations, get_matching_target_attestations, - get_total_active_balance, get_unslashed_attesting_indices, -}; use super::validator_statuses::{TotalBalances, ValidatorStatus, ValidatorStatuses}; use super::{Error, WinningRootHashSet}; use integer_sqrt::IntegerSquareRoot; @@ -181,9 +177,7 @@ fn get_attestation_delta( let inclusion = validator .inclusion_info .expect("It is a logic error for an attester not to have an inclusion distance."); - delta.reward( - base_reward * spec.min_attestation_inclusion_delay / inclusion.distance.as_u64(), - ); + delta.reward(base_reward * spec.min_attestation_inclusion_delay / inclusion.distance); } else { delta.penalize(base_reward); }