diff --git a/libraries/chain/db_bet.cpp b/libraries/chain/db_bet.cpp index 2c40c200..8c3e1357 100644 --- a/libraries/chain/db_bet.cpp +++ b/libraries/chain/db_bet.cpp @@ -307,6 +307,8 @@ void database::settle_betting_market_group(const betting_market_group_object& be fc_dlog(fc::logger::get("betting"), "removing betting market group ${id}", ("id", betting_market_group.id)); remove(betting_market_group); + + payout_helper.commit(); } void database::remove_completed_events() @@ -330,8 +332,6 @@ void database::remove_completed_events() fc_dlog(fc::logger::get("betting"), "removing settled event ${id}", ("id", event.id)); remove(event); } - - payout_helper.commit(); } share_type adjust_betting_position(database& db, diff --git a/libraries/chain/proposal_evaluator.cpp b/libraries/chain/proposal_evaluator.cpp index 83282537..a6640ea4 100644 --- a/libraries/chain/proposal_evaluator.cpp +++ b/libraries/chain/proposal_evaluator.cpp @@ -55,21 +55,21 @@ struct proposal_operation_hardfork_visitor "Parameter extensions are not allowed yet!" ); } - void operator()(const graphene::chain::tournament_payout_operation &o) const { - // TODO: move check into tournament_payout_operation::validate after HARDFORK_999_TIME - FC_ASSERT( block_time < HARDFORK_999_TIME, "Not allowed!" ); - } + void operator()(const graphene::chain::tournament_payout_operation &o) const { + // TODO: move check into tournament_payout_operation::validate after HARDFORK_999_TIME + FC_ASSERT( block_time < HARDFORK_999_TIME, "Not allowed!" ); + } - void operator()(const graphene::chain::asset_settle_cancel_operation &o) const { - // TODO: move check into asset_settle_cancel_operation::validate after HARDFORK_999_TIME - FC_ASSERT( block_time < HARDFORK_999_TIME, "Not allowed!" ); - } + void operator()(const graphene::chain::asset_settle_cancel_operation &o) const { + // TODO: move check into asset_settle_cancel_operation::validate after HARDFORK_999_TIME + FC_ASSERT( block_time < HARDFORK_999_TIME, "Not allowed!" ); + } - void operator()(const graphene::chain::account_create_operation &aco) const { - // TODO: remove after HARDFORK_999_TIME - if (block_time < HARDFORK_999_TIME) - FC_ASSERT( !aco.extensions.value.affiliate_distributions.valid(), "Affiliate reward distributions not allowed yet" ); - } + void operator()(const graphene::chain::account_create_operation &aco) const { + // TODO: remove after HARDFORK_999_TIME + if (block_time < HARDFORK_999_TIME) + FC_ASSERT( !aco.extensions.value.affiliate_distributions.valid(), "Affiliate reward distributions not allowed yet" ); + } void operator()(const sport_update_operation &v) const { FC_ASSERT( block_time >= HARDFORK_1000_TIME, "sport_update_operation not allowed yet!" ); @@ -135,11 +135,6 @@ struct proposal_operation_hardfork_visitor FC_ASSERT( block_time >= HARDFORK_1000_TIME, "event_update_status_operation not allowed yet!" ); } - void operator()(const graphene::chain::account_create_operation &aco) const { - if (block_time < HARDFORK_999_TIME) - FC_ASSERT( !aco.extensions.value.affiliate_distributions.valid(), "Affiliate reward distributions not allowed yet" ); - } - // loop and self visit in proposals void operator()(const proposal_create_operation &v) const { for (const op_wrapper &op : v.proposed_ops) diff --git a/programs/witness_node/main.cpp b/programs/witness_node/main.cpp index 4d080aa4..6f55d593 100644 --- a/programs/witness_node/main.cpp +++ b/programs/witness_node/main.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +//#include #include #include @@ -87,7 +87,7 @@ int main(int argc, char** argv) { auto list_plug = node->register_plugin(); auto affiliate_stats_plug = node->register_plugin(); auto bookie_plug = node->register_plugin(); - auto snapshot_plug = node->register_plugin(); +// auto snapshot_plug = node->register_plugin(); try { diff --git a/tests/tests/affiliate_tests.cpp b/tests/tests/affiliate_tests.cpp index e1b23d9c..ab109ad3 100644 --- a/tests/tests/affiliate_tests.cpp +++ b/tests/tests/affiliate_tests.cpp @@ -537,7 +537,7 @@ BOOST_AUTO_TEST_CASE( bookie_payout_test ) {blackhawks_win_market.id, betting_market_resolution_type::not_win}}); generate_block(); - uint16_t rake_fee_percentage = db.get_global_properties().parameters.betting_rake_fee_percentage; + uint16_t rake_fee_percentage = db.get_global_properties().parameters.betting_rake_fee_percentage(); BOOST_CHECK_EQUAL( 3 * GRAPHENE_1_PERCENT, rake_fee_percentage ); uint32_t rake_value; // rake_value = (-10000 + 110000 - 110000) * rake_fee_percentage / GRAPHENE_1_PERCENT / 100;