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 245cd8e commit 0b5639c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions libraries/protocol/include/golos/protocol/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@
#define GOLOS_CREATE_ACCOUNT_DELEGATION_TIME (fc::days(1))
#define GOLOS_MIN_DELEGATION_MULTIPLIER 10

#define GOLOS_DEFAULT_MAX_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
#define GOLOS_DEFAULT_MAX_REFERRAL_TERM_SEC (60*60*24*30*6)
#define GOLOS_HIGHEST_MAX_REFERRAL_TERM_SEC (60*60*24*30*12)
#define GOLOS_DEFAULT_MAX_REFERRAL_BREAK_FEE asset(100, STEEM_SYMBOL)
#define GOLOS_HIGHEST_MAX_REFERRAL_BREAK_FEE asset(100, STEEM_SYMBOL)
#define GOLOS_MAX_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
#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)
#define GOLOS_MAX_REFERRAL_BREAK_FEE asset(100, STEEM_SYMBOL)

#define STEEMIT_MINING_REWARD asset(666, STEEM_SYMBOL)
#define STEEMIT_MINING_REWARD_PRE_HF_16 asset(1000, STEEM_SYMBOL)
Expand Down Expand Up @@ -327,11 +327,11 @@
#define GOLOS_CREATE_ACCOUNT_DELEGATION_TIME (fc::days(30))
#define GOLOS_MIN_DELEGATION_MULTIPLIER 10

#define GOLOS_DEFAULT_MAX_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
#define GOLOS_DEFAULT_MAX_REFERRAL_TERM_SEC (60*60*24*30*6)
#define GOLOS_HIGHEST_MAX_REFERRAL_TERM_SEC (60*60*24*30*12)
#define GOLOS_DEFAULT_MAX_REFERRAL_BREAK_FEE asset(100, STEEM_SYMBOL)
#define GOLOS_HIGHEST_MAX_REFERRAL_BREAK_FEE asset(100, STEEM_SYMBOL)
#define GOLOS_MAX_REFERRAL_INTEREST_RATE (10*STEEMIT_1_PERCENT) // 10%
#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)
#define GOLOS_MAX_REFERRAL_BREAK_FEE asset(100, STEEM_SYMBOL)

#define STEEMIT_MINING_REWARD asset(666, STEEM_SYMBOL)
#define STEEMIT_MINING_REWARD_PRE_HF_16 asset(1000, STEEM_SYMBOL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,17 +505,17 @@ namespace golos { namespace protocol {
/**
* Maximum percent of referral deductions
*/
uint16_t max_referral_interest_rate = GOLOS_DEFAULT_MAX_REFERRAL_INTEREST_RATE;
uint16_t max_referral_interest_rate = GOLOS_MAX_REFERRAL_INTEREST_RATE;

/**
* Maximum term of referral deductions
*/
uint32_t max_referral_term_sec = GOLOS_DEFAULT_MAX_REFERRAL_TERM_SEC;
uint32_t max_referral_term_sec = GOLOS_DEFAULT_REFERRAL_TERM_SEC;

/**
* Fee for breaking referral deductions by referral
*/
asset max_referral_break_fee = GOLOS_DEFAULT_MAX_REFERRAL_BREAK_FEE;
asset max_referral_break_fee = GOLOS_DEFAULT_REFERRAL_BREAK_FEE;

void validate() const;

Expand Down
4 changes: 2 additions & 2 deletions libraries/protocol/steem_operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ 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_term_sec, GOLOS_HIGHEST_MAX_REFERRAL_TERM_SEC);
GOLOS_CHECK_VALUE_LEGE(max_referral_break_fee.amount, 0, GOLOS_HIGHEST_MAX_REFERRAL_BREAK_FEE.amount);
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);
}

void witness_update_operation::validate() const {
Expand Down

0 comments on commit 0b5639c

Please sign in to comment.