Closed maslenitsa93 closed 4 years ago
Code:
void delegate_vesting_shares(..., uint16_t interest_rate) { ... if (delegation) { GOLOS_CHECK_LOGIC(delegation->interest_rate == interest_rate, logic_exception::cannot_change_delegator_interest_rate, "Cannot change interest rate of already created delegation"); } ... } void delegate_vesting_shares_evaluator::do_apply(const delegate_vesting_shares_operation& op) { const auto& median_props = _db.get_witness_schedule_object().median_props; delegate_vesting_shares(..., 0); }
Following case possible:
delegate_vesting_shares_with_interest
delegate_vesting_shares
25 == 0
In older version, only delegate_vesting_shares_with_interest has such check.
Code:
Following case possible:
delegate_vesting_shares_with_interest
sets interest_rate to 25.delegate_vesting_shares
calling to increase/decrease this delegation, not for change interest_rate.25 == 0
thinks that it is changing.In older version, only
delegate_vesting_shares_with_interest
has such check.