resolve merge conflict

This commit is contained in:
pbattu123 2019-10-23 22:15:26 -03:00
parent 3be3fd36bb
commit d6da2963dc

View file

@ -728,12 +728,6 @@ void deprecate_annual_members( database& db )
uint32_t database::get_gpos_current_subperiod() uint32_t database::get_gpos_current_subperiod()
{ {
fc::time_point_sec last_date_voted; fc::time_point_sec last_date_voted;
// get last time voted form account stats
// check last_vote_time of proxy voting account if proxy is set
if (stake_account.options.voting_account == GRAPHENE_PROXY_TO_SELF_ACCOUNT)
last_date_voted = stake_account.statistics(*this).last_vote_time;
else
last_date_voted = stake_account.options.voting_account(*this).statistics(*this).last_vote_time;
const auto &gpo = this->get_global_properties(); const auto &gpo = this->get_global_properties();
const auto vesting_period = gpo.parameters.gpos_period(); const auto vesting_period = gpo.parameters.gpos_period();
@ -764,9 +758,13 @@ uint32_t database::get_gpos_current_subperiod()
double database::calculate_vesting_factor(const account_object& stake_account) double database::calculate_vesting_factor(const account_object& stake_account)
{ {
// get last time voted form stats fc::time_point_sec last_date_voted;
const auto &stats = stake_account.statistics(*this); // get last time voted form account stats
fc::time_point_sec last_date_voted = stats.last_vote_time; // check last_vote_time of proxy voting account if proxy is set
if (stake_account.options.voting_account == GRAPHENE_PROXY_TO_SELF_ACCOUNT)
last_date_voted = stake_account.statistics(*this).last_vote_time;
else
last_date_voted = stake_account.options.voting_account(*this).statistics(*this).last_vote_time;
// get global data related to gpos // get global data related to gpos
const auto &gpo = this->get_global_properties(); const auto &gpo = this->get_global_properties();