Merge branch 'feature/SONs-base' into feature/SON-83

This commit is contained in:
obucinac 2019-10-08 20:35:07 +02:00 committed by GitHub
commit c8aa95606f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 3 deletions

View file

@ -227,6 +227,9 @@
#define TOURNAMENT_MAX_WHITELIST_LENGTH 1000
#define TOURNAMENT_MAX_START_TIME_IN_FUTURE (60*60*24*7*4) // 1 month
#define TOURNAMENT_MAX_START_DELAY (60*60*24*7) // 1 week
#define GPOS_PERIOD (60*60*24*30*6) // 6 months
#define GPOS_SUBPERIOD (60*60*24*30) // 1 month
#define MIN_SON_MEMBER_COUNT 15
#define SWEEPS_DEFAULT_DISTRIBUTION_PERCENTAGE (2*GRAPHENE_1_PERCENT)
#define SWEEPS_DEFAULT_DISTRIBUTION_ASSET (graphene::chain::asset_id_type(0))

View file

@ -37,6 +37,11 @@ namespace graphene { namespace chain {
optional< uint16_t > betting_rake_fee_percentage;
optional< flat_map<bet_multiplier_type, bet_multiplier_type> > permitted_betting_odds_increments;
optional< uint16_t > live_betting_delay_time;
/* gpos parameters */
optional < uint32_t > gpos_period;
optional < uint32_t > gpos_subperiod;
optional < uint32_t > gpos_period_start;
optional < uint16_t > son_count;
optional< uint16_t > sweeps_distribution_percentage;
optional< asset_id_type > sweeps_distribution_asset;
optional< account_id_type > sweeps_vesting_accumulator_account;
@ -119,6 +124,9 @@ namespace graphene { namespace chain {
inline account_id_type sweeps_vesting_accumulator_account()const {
return extensions.value.sweeps_vesting_accumulator_account.valid() ? *extensions.value.sweeps_vesting_accumulator_account : SWEEPS_ACCUMULATOR_ACCOUNT;
}
inline uint16_t son_count()const {
return extensions.value.son_count.valid() ? *extensions.value.son_count : MIN_SON_MEMBER_COUNT;
}
};
} } // graphene::chain
@ -129,6 +137,10 @@ FC_REFLECT( graphene::chain::parameter_extension,
(betting_rake_fee_percentage)
(permitted_betting_odds_increments)
(live_betting_delay_time)
(gpos_period)
(gpos_subperiod)
(gpos_period_start)
(son_count)
(sweeps_distribution_percentage)
(sweeps_distribution_asset)
(sweeps_vesting_accumulator_account)

View file

@ -169,6 +169,7 @@ int main(int argc, char** argv) {
elog("Error parsing configuration file: ${e}", ("e", e.what()));
return 1;
}
if( !options.count("plugins") )
options.insert( std::make_pair( "plugins", bpo::variable_value(std::string("delayed_node account_history market_history"), true) ) );

View file

@ -50,14 +50,14 @@
#include <iostream>
#ifdef WIN32
# include <signal.h>
# include <signal.h>
#else
# include <csignal>
#endif
using namespace graphene;
namespace bpo = boost::program_options;
int main(int argc, char** argv) {
app::application* node = new app::application();
fc::oexception unhandled_exception;
@ -193,4 +193,3 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
}