Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Fix #756
Browse files Browse the repository at this point in the history
  • Loading branch information
maslenitsa93 committed Oct 11, 2018
1 parent b0dba93 commit 3086325
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions libraries/chain/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2308,17 +2308,17 @@ namespace golos { namespace chain {
a.received_vesting_shares += delegator_vesting;
});

auto vdo_itr = vdo_idx.lower_bound(voter.name);
if (vdo_itr != vdo_idx.end() && vdo_itr->delegatee == voter.name) {
auto vdo_itr = vdo_idx.find(std::make_tuple(voter.name, dvir.account));
if (vdo_itr != vdo_idx.end()) {
modify(*vdo_itr, [&](vesting_delegation_object& o) {
o.vesting_shares += delegator_vesting;
});
auto vdeo_itr = vdeo_idx.find(std::make_tuple(vdo_itr->delegatee, vdo_itr->delegator));
for (; vdeo_itr != vdeo_idx.end(); ++vdeo_itr) {
modify(*vdeo_itr, [&](vesting_delegation_expiration_object& o) {
o.vesting_shares += delegator_vesting;
});
}
}
auto vdeo_itr = vdeo_idx.find(std::make_tuple(voter.name, dvir.account));
for (; vdeo_itr != vdeo_idx.end(); ++vdeo_itr) {
modify(*vdeo_itr, [&](vesting_delegation_expiration_object& o) {
o.vesting_shares += delegator_vesting;
});
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/protocol/include/golos/protocol/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
#define GOLOS_CREATE_ACCOUNT_DELEGATION_TIME (fc::days(1))
#define GOLOS_MIN_DELEGATION_MULTIPLIER 10

#define STEEMIT_DEFAULT_DELEGATED_VESTING_INTEREST_RATE (80*STEEMIT_1_PERCENT) // 80%
#define STEEMIT_DEFAULT_DELEGATED_VESTING_INTEREST_RATE (25*STEEMIT_1_PERCENT) // 25%
#define STEEMIT_MAX_DELEGATED_VESTING_INTEREST_RATE (80*STEEMIT_1_PERCENT) // 80%

#define GOLOS_DEFAULT_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
Expand Down Expand Up @@ -343,7 +343,7 @@
#define GOLOS_CREATE_ACCOUNT_DELEGATION_TIME (fc::days(30))
#define GOLOS_MIN_DELEGATION_MULTIPLIER 10

#define STEEMIT_DEFAULT_DELEGATED_VESTING_INTEREST_RATE (80*STEEMIT_1_PERCENT) // 80%
#define STEEMIT_DEFAULT_DELEGATED_VESTING_INTEREST_RATE (25*STEEMIT_1_PERCENT) // 25%
#define STEEMIT_MAX_DELEGATED_VESTING_INTEREST_RATE (80*STEEMIT_1_PERCENT) // 80%

#define GOLOS_DEFAULT_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ namespace golos { namespace protocol {
account_name_type delegator; ///< The account delegating vesting shares
account_name_type delegatee; ///< The account receiving vesting shares
asset vesting_shares; ///< The amount of vesting shares delegated
uint16_t interest_rate = STEEMIT_MAX_DELEGATED_VESTING_INTEREST_RATE; ///< The interest rate wanted by delegator
uint16_t interest_rate = STEEMIT_DEFAULT_DELEGATED_VESTING_INTEREST_RATE; ///< The interest rate wanted by delegator
extensions_type extensions; ///< Extensions. Not currently used.

void validate() const;
Expand Down

0 comments on commit 3086325

Please sign in to comment.