From 30c95f6010927339d91cb08e0e168f69549a0129 Mon Sep 17 00:00:00 2001 From: Alfredo Date: Thu, 24 Jan 2019 17:52:24 -0300 Subject: [PATCH] remove not needed period calculation --- libraries/chain/db_maint.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libraries/chain/db_maint.cpp b/libraries/chain/db_maint.cpp index 7187fd9b..f737b2a3 100644 --- a/libraries/chain/db_maint.cpp +++ b/libraries/chain/db_maint.cpp @@ -762,12 +762,8 @@ double calculate_vesting_factor(const database& d, const account_object& stake_a // coefficient calculation is: (n-1)/number_of_subperiods double n = number_of_subperiods + 1; - auto period = std::find_if(period_list.begin(), period_list.end(),[&](uint32_t p) { - return (p == current_period); - }); - // todo: improve this loop - std::list subperiod_list(*period); + std::list subperiod_list(current_period); std::iota(subperiod_list.begin(), subperiod_list.end(), 1); for(auto subperiod: subperiod_list)