diff --git a/libraries/app/include/graphene/app/full_account.hpp b/libraries/app/include/graphene/app/full_account.hpp index 955857b7..9e8036e6 100644 --- a/libraries/app/include/graphene/app/full_account.hpp +++ b/libraries/app/include/graphene/app/full_account.hpp @@ -67,7 +67,6 @@ FC_REFLECT( graphene::app::full_account, (limit_orders) (call_orders) (settle_orders) - (proposals) (assets) (withdraws) (proposals) diff --git a/libraries/chain/db_block.cpp b/libraries/chain/db_block.cpp index 119c9276..ea3739c4 100644 --- a/libraries/chain/db_block.cpp +++ b/libraries/chain/db_block.cpp @@ -160,6 +160,7 @@ void database::check_tansaction_for_duplicated_operations(const signed_transacti existed_operations_digests.insert( proposed_operations_digests.begin(), proposed_operations_digests.end() ); }); + /// FIXME / TODO: Migrate this check to a new API call to leave a broadcast call that does not do dupchecks auto proposed_operations_digests = gather_proposed_operations_digests(trx); for (auto& digest: proposed_operations_digests) { diff --git a/libraries/chain/include/graphene/chain/betting_market_object.hpp b/libraries/chain/include/graphene/chain/betting_market_object.hpp index f69b03f3..98015439 100644 --- a/libraries/chain/include/graphene/chain/betting_market_object.hpp +++ b/libraries/chain/include/graphene/chain/betting_market_object.hpp @@ -709,8 +709,8 @@ inline Stream& operator>>( Stream& s, betting_market_group_object& betting_marke } } // graphene::chain FC_REFLECT_DERIVED( graphene::chain::betting_market_rules_object, (graphene::db::object), (name)(description) ) -FC_REFLECT_DERIVED( graphene::chain::betting_market_group_object, (graphene::db::object), (description) ) -FC_REFLECT_DERIVED( graphene::chain::betting_market_object, (graphene::db::object), (group_id) ) +FC_REFLECT_DERIVED( graphene::chain::betting_market_group_object, (graphene::db::object), (description)(event_id)(rules_id)(asset_id)(total_matched_bets_amount)(never_in_play)(delay_before_settling)(settling_time) ) +FC_REFLECT_DERIVED( graphene::chain::betting_market_object, (graphene::db::object), (group_id)(description)(payout_condition)(resolution) ) FC_REFLECT_DERIVED( graphene::chain::bet_object, (graphene::db::object), (bettor_id)(betting_market_id)(amount_to_bet)(backer_multiplier)(back_or_lay)(end_of_delay) ) FC_REFLECT_DERIVED( graphene::chain::betting_market_position_object, (graphene::db::object), (bettor_id)(betting_market_id)(pay_if_payout_condition)(pay_if_not_payout_condition)(pay_if_canceled)(pay_if_not_canceled)(fees_collected) ) diff --git a/libraries/chain/include/graphene/chain/event_object.hpp b/libraries/chain/include/graphene/chain/event_object.hpp index 7682addc..6f189d92 100644 --- a/libraries/chain/include/graphene/chain/event_object.hpp +++ b/libraries/chain/include/graphene/chain/event_object.hpp @@ -151,5 +151,5 @@ typedef generic_index event_object_ return s; } } } // graphene::chain -FC_REFLECT(graphene::chain::event_object, (name)) +FC_REFLECT(graphene::chain::event_object, (name)(season)(start_time)(event_group_id)(at_least_one_betting_market_group_settled)(scores)) diff --git a/libraries/chain/include/graphene/chain/protocol/betting_market.hpp b/libraries/chain/include/graphene/chain/protocol/betting_market.hpp index 26b6f263..8ed9e2ac 100644 --- a/libraries/chain/include/graphene/chain/protocol/betting_market.hpp +++ b/libraries/chain/include/graphene/chain/protocol/betting_market.hpp @@ -481,13 +481,13 @@ FC_REFLECT( graphene::chain::bet_place_operation, (fee)(bettor_id)(betting_market_id)(amount_to_bet)(backer_multiplier)(back_or_lay)(extensions) ) FC_REFLECT( graphene::chain::bet_matched_operation::fee_parameters_type, ) -FC_REFLECT( graphene::chain::bet_matched_operation, (bettor_id)(bet_id)(amount_bet)(backer_multiplier)(guaranteed_winnings_returned) ) +FC_REFLECT( graphene::chain::bet_matched_operation, (fee)(bettor_id)(bet_id)(amount_bet)(backer_multiplier)(guaranteed_winnings_returned) ) FC_REFLECT( graphene::chain::bet_cancel_operation::fee_parameters_type, (fee) ) FC_REFLECT( graphene::chain::bet_cancel_operation, (fee) (bettor_id) (bet_to_cancel) (extensions) ) FC_REFLECT( graphene::chain::bet_canceled_operation::fee_parameters_type, ) -FC_REFLECT( graphene::chain::bet_canceled_operation, (bettor_id)(bet_id)(stake_returned) ) +FC_REFLECT( graphene::chain::bet_canceled_operation, (fee)(bettor_id)(bet_id)(stake_returned) ) FC_REFLECT( graphene::chain::bet_adjusted_operation::fee_parameters_type, ) -FC_REFLECT( graphene::chain::bet_adjusted_operation, (bettor_id)(bet_id)(stake_returned) ) +FC_REFLECT( graphene::chain::bet_adjusted_operation, (fee) (bettor_id)(bet_id)(stake_returned) ) diff --git a/libraries/chain/proposal_evaluator.cpp b/libraries/chain/proposal_evaluator.cpp index a6640ea4..cd7bbc82 100644 --- a/libraries/chain/proposal_evaluator.cpp +++ b/libraries/chain/proposal_evaluator.cpp @@ -71,10 +71,18 @@ struct proposal_operation_hardfork_visitor FC_ASSERT( !aco.extensions.value.affiliate_distributions.valid(), "Affiliate reward distributions not allowed yet" ); } + void operator()(const sport_create_operation &v) const { + FC_ASSERT( block_time >= HARDFORK_1000_TIME, "sport_create_operation not allowed yet!" ); + } + void operator()(const sport_update_operation &v) const { FC_ASSERT( block_time >= HARDFORK_1000_TIME, "sport_update_operation not allowed yet!" ); } + void operator()(const sport_delete_operation &v) const { + FC_ASSERT( block_time >= HARDFORK_1000_TIME, "sport_delete_operation not allowed yet!" ); + } + void operator()(const event_group_create_operation &v) const { FC_ASSERT( block_time >= HARDFORK_1000_TIME, "event_group_create_operation not allowed yet!" ); } @@ -83,6 +91,10 @@ struct proposal_operation_hardfork_visitor FC_ASSERT( block_time >= HARDFORK_1000_TIME, "event_group_update_operation not allowed yet!" ); } + void operator()(const event_group_delete_operation &v) const { + FC_ASSERT( block_time >= HARDFORK_1000_TIME, "event_group_delete_operation not allowed yet!" ); + } + void operator()(const event_create_operation &v) const { FC_ASSERT( block_time >= HARDFORK_1000_TIME, "event_create_operation not allowed yet!" ); } @@ -120,7 +132,7 @@ struct proposal_operation_hardfork_visitor } void operator()(const bet_cancel_operation &v) const { - FC_ASSERT( block_time >= HARDFORK_1000_TIME, "betting_market_group_resolve_operation not allowed yet!" ); + FC_ASSERT( block_time >= HARDFORK_1000_TIME, "bet_cancel_operation not allowed yet!" ); } void operator()(const betting_market_group_update_operation &v) const { diff --git a/libraries/chain/protocol/competitor.cpp b/libraries/chain/protocol/competitor.cpp deleted file mode 100644 index 1f35cf37..00000000 --- a/libraries/chain/protocol/competitor.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2018 Peerplays Blockchain Standards Association, and contributors. - * - * The MIT License - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#include - -namespace graphene { namespace chain { - -void competitor_create_operation::validate() const -{ - FC_ASSERT( fee.amount >= 0 ); -} - - -} } // graphene::chain -