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

Commit

Permalink
Fix #295
Browse files Browse the repository at this point in the history
  • Loading branch information
maslenitsa93 committed Aug 24, 2018
1 parent 0b5639c commit 9607c03
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions libraries/protocol/include/golos/protocol/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@
#define GOLOS_CREATE_ACCOUNT_DELEGATION_TIME (fc::days(1))
#define GOLOS_MIN_DELEGATION_MULTIPLIER 10

#define GOLOS_MAX_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
#define GOLOS_DEFAULT_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
#define GOLOS_MAX_REFERRAL_INTEREST_RATE STEEMIT_100_PERCENT
#define GOLOS_DEFAULT_REFERRAL_TERM_SEC (60*60*24*30*6)
#define GOLOS_MAX_REFERRAL_TERM_SEC (60*60*24*30*12)
#define GOLOS_DEFAULT_REFERRAL_BREAK_FEE asset(100, STEEM_SYMBOL)
Expand Down Expand Up @@ -327,7 +328,8 @@
#define GOLOS_CREATE_ACCOUNT_DELEGATION_TIME (fc::days(30))
#define GOLOS_MIN_DELEGATION_MULTIPLIER 10

#define GOLOS_MAX_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
#define GOLOS_DEFAULT_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
#define GOLOS_MAX_REFERRAL_INTEREST_RATE STEEMIT_100_PERCENT
#define GOLOS_DEFAULT_REFERRAL_TERM_SEC (60*60*24*30*6)
#define GOLOS_MAX_REFERRAL_TERM_SEC (60*60*24*30*12)
#define GOLOS_DEFAULT_REFERRAL_BREAK_FEE asset(100, STEEM_SYMBOL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ namespace golos { namespace protocol {
/**
* Maximum percent of referral deductions
*/
uint16_t max_referral_interest_rate = GOLOS_MAX_REFERRAL_INTEREST_RATE;
uint16_t max_referral_interest_rate = GOLOS_DEFAULT_REFERRAL_INTEREST_RATE;

/**
* Maximum term of referral deductions
Expand Down
2 changes: 1 addition & 1 deletion libraries/protocol/steem_operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ namespace golos { namespace protocol {

void chain_properties_19::validate() const {
chain_properties_18::validate();
GOLOS_CHECK_VALUE_LE(max_referral_interest_rate, STEEMIT_100_PERCENT);
GOLOS_CHECK_VALUE_LE(max_referral_interest_rate, GOLOS_MAX_REFERRAL_INTEREST_RATE);
GOLOS_CHECK_VALUE_LE(max_referral_term_sec, GOLOS_MAX_REFERRAL_TERM_SEC);
GOLOS_CHECK_VALUE_LEGE(max_referral_break_fee.amount, 0, GOLOS_MAX_REFERRAL_BREAK_FEE.amount);
}
Expand Down

0 comments on commit 9607c03

Please sign in to comment.