diff --git a/libraries/chain/include/graphene/chain/config.hpp b/libraries/chain/include/graphene/chain/config.hpp index a5354f85..5e4851b9 100644 --- a/libraries/chain/include/graphene/chain/config.hpp +++ b/libraries/chain/include/graphene/chain/config.hpp @@ -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)) diff --git a/libraries/chain/include/graphene/chain/protocol/chain_parameters.hpp b/libraries/chain/include/graphene/chain/protocol/chain_parameters.hpp index 647d3f99..90bf7088 100644 --- a/libraries/chain/include/graphene/chain/protocol/chain_parameters.hpp +++ b/libraries/chain/include/graphene/chain/protocol/chain_parameters.hpp @@ -37,6 +37,11 @@ namespace graphene { namespace chain { optional< uint16_t > betting_rake_fee_percentage; optional< flat_map > 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) diff --git a/programs/delayed_node/main.cpp b/programs/delayed_node/main.cpp index 5894dcf8..3e058b64 100644 --- a/programs/delayed_node/main.cpp +++ b/programs/delayed_node/main.cpp @@ -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) ) ); diff --git a/programs/witness_node/main.cpp b/programs/witness_node/main.cpp index 2b3ab13a..6675ee87 100644 --- a/programs/witness_node/main.cpp +++ b/programs/witness_node/main.cpp @@ -50,14 +50,14 @@ #include #ifdef WIN32 -# include +# include #else # include #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; } } -