Skip to content

Commit

Permalink
fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gladcow committed Sep 20, 2019
1 parent a0d3c5f commit 72d6442
Show file tree
Hide file tree
Showing 58 changed files with 452 additions and 607 deletions.
1 change: 0 additions & 1 deletion libraries/app/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ template class fc::api<graphene::app::network_node_api>;
template class fc::api<graphene::app::history_api>;
template class fc::api<graphene::app::crypto_api>;
template class fc::api<graphene::app::asset_api>;
template class fc::api<graphene::app::orders_api>;
template class fc::api<graphene::debug_witness::debug_api>;
template class fc::api<graphene::app::login_api>;

Expand Down
1 change: 0 additions & 1 deletion libraries/app/include/graphene/app/api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ extern template class fc::api<graphene::app::network_node_api>;
extern template class fc::api<graphene::app::history_api>;
extern template class fc::api<graphene::app::crypto_api>;
extern template class fc::api<graphene::app::asset_api>;
extern template class fc::api<graphene::app::orders_api>;
extern template class fc::api<graphene::debug_witness::debug_api>;

namespace graphene { namespace app {
Expand Down
31 changes: 0 additions & 31 deletions libraries/chain/account_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,37 +269,6 @@ void account_referrer_index::object_modified( const object& after )

} } // graphene::chain

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::account_object,
(graphene::db::object),
(membership_expiration_date)(registrar)(referrer)(lifetime_referrer)
(network_fee_percentage)(lifetime_referrer_fee_percentage)(referrer_rewards_percentage)
(name)(owner)(active)(options)(statistics)(whitelisting_accounts)(blacklisting_accounts)
(whitelisted_accounts)(blacklisted_accounts)
(cashback_vb)
(owner_special_authority)(active_special_authority)
(top_n_control_flags)
(allowed_assets)(affiliate_distributions)
)

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::account_balance_object,
(graphene::db::object),
(owner)(asset_type)(balance) )

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::account_statistics_object,
(graphene::chain::object),
(owner)
(most_recent_op)
(total_ops)(removed_ops)
(total_core_in_orders)
(lifetime_fees_paid)
(pending_fees)(pending_vested_fees)
(last_vote_time)
)

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::pending_dividend_payout_balance_for_holder_object,
(graphene::db::object),
(owner)(dividend_holder_asset_type)(dividend_payout_asset_type)(pending_balance) )


GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_balance_object )
Expand Down
52 changes: 0 additions & 52 deletions libraries/chain/asset_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,58 +292,6 @@ void sweeps_vesting_balance_object::adjust_balance( const asset& delta )
}


FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::asset_dynamic_data_object, (graphene::db::object),
(current_supply)(sweeps_tickets_sold)(confidential_supply)(accumulated_fees)(fee_pool) )

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::asset_bitasset_data_object, (graphene::db::object),
(feeds)
(current_feed)
(current_feed_publication_time)
(options)
(force_settled_volume)
(is_prediction_market)
(settlement_price)
(settlement_fund)
)

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::asset_dividend_data_object, (graphene::db::object),
(options)
(last_scheduled_payout_time)
(last_payout_time )
(last_scheduled_distribution_time)
(last_distribution_time)
(dividend_distribution_account)
)

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::total_distributed_dividend_balance_object, (graphene::db::object),
(dividend_holder_asset_type)
(dividend_payout_asset_type)
(balance_at_last_maintenance_interval)
)

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::asset_object, (graphene::db::object),
(symbol)
(precision)
(issuer)
(options)
(lottery_options)
(dynamic_asset_data_id)
(bitasset_data_id)
(buyback_account)
(dividend_data_id)
)

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::lottery_balance_object, (graphene::db::object),
(lottery_id)
(balance)
)

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::sweeps_vesting_balance_object, (graphene::db::object),
(owner)
(balance)
(asset_id)
(last_claim_date)
)

GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_bitasset_data_object )
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/balance_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include <graphene/chain/balance_evaluator.hpp>
#include <graphene/protocol/pts_address.hpp>
#include <graphene/chain/pts_address.hpp>

namespace graphene { namespace chain {

Expand Down
3 changes: 0 additions & 3 deletions libraries/chain/betting_market_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,8 @@ void betting_market_object::on_canceled_event(database& db)

} } // graphene::chain

FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::betting_market_rules_object, (graphene::db::object), (name)(description) )
FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::betting_market_group_object, (graphene::db::object), (description) )
FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::betting_market_object, (graphene::db::object), (group_id) )
FC_REFLECT_DERIVED_NO_TYPENAME( 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_NO_TYPENAME( 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) )

GRAPHENE_EXTERNAL_SERIALIZATION( /* no extern */, graphene::chain::betting_market_rules_object )
GRAPHENE_EXTERNAL_SERIALIZATION( /* no extern */, graphene::chain::betting_market_group_object )
Expand Down
6 changes: 3 additions & 3 deletions libraries/chain/exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ namespace graphene { namespace chain {
FC_IMPLEMENT_DERIVED_EXCEPTION( undo_database_exception, chain_exception, 3070000, "undo database exception" )
FC_IMPLEMENT_DERIVED_EXCEPTION( unlinkable_block_exception, chain_exception, 3080000, "unlinkable block" )
FC_IMPLEMENT_DERIVED_EXCEPTION( black_swan_exception, chain_exception, 3090000, "black swan" )
FC_IMPLEMENT_DERIVED_EXCEPTION( plugin_exception, chain_exception, 3100000, "plugin exception" )

FC_IMPLEMENT_DERIVED_EXCEPTION( invalid_pts_address, utility_exception, 3060001, "invalid pts address" )
FC_IMPLEMENT_DERIVED_EXCEPTION( insufficient_feeds, chain_exception, 37006, "insufficient feeds" )

FC_IMPLEMENT_DERIVED_EXCEPTION( pop_empty_chain, undo_database_exception, 3070001, "there are no blocks to pop" )
Expand Down Expand Up @@ -136,9 +136,9 @@ namespace graphene { namespace chain {
{ throw( effect_type( e.what(), e.get_log() ) ); }


FC_IMPLEMENT_EXCEPTION( protocol_exception, 4000000, "protocol exception" )
FC_IMPLEMENT_EXCEPTION(no_transition, 100000, "Invalid state transition")

FC_IMPLEMENT_DERIVED_EXCEPTION( transaction_exception, protocol_exception, 4010000,
FC_IMPLEMENT_DERIVED_EXCEPTION( transaction_exception, chain_exception, 4010000,
"transaction validation exception" )

FC_IMPLEMENT_DERIVED_EXCEPTION( tx_missing_active_auth, transaction_exception, 4010001,
Expand Down
3 changes: 3 additions & 0 deletions libraries/chain/fba_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,6 @@ bool fba_accumulator_object::is_configured( const database& db )const
}

} }

GRAPHENE_EXTERNAL_SERIALIZATION( /* no extern */, graphene::chain::fba_accumulator_object )

39 changes: 31 additions & 8 deletions libraries/chain/include/graphene/chain/account_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,14 +468,37 @@ namespace graphene { namespace chain {

}}

MAP_OBJECT_ID_TO_TYPE(graphene::chain::account_object)
MAP_OBJECT_ID_TO_TYPE(graphene::chain::account_balance_object)
MAP_OBJECT_ID_TO_TYPE(graphene::chain::account_statistics_object)

FC_REFLECT_TYPENAME( graphene::chain::account_object )
FC_REFLECT_TYPENAME( graphene::chain::account_balance_object )
FC_REFLECT_TYPENAME( graphene::chain::account_statistics_object )
FC_REFLECT_TYPENAME( graphene::chain::pending_dividend_payout_balance_for_holder_object )
FC_REFLECT_DERIVED( graphene::chain::account_object,
(graphene::db::object),
(membership_expiration_date)(registrar)(referrer)(lifetime_referrer)
(network_fee_percentage)(lifetime_referrer_fee_percentage)(referrer_rewards_percentage)
(name)(owner)(active)(options)(statistics)(whitelisting_accounts)(blacklisting_accounts)
(whitelisted_accounts)(blacklisted_accounts)
(cashback_vb)
(owner_special_authority)(active_special_authority)
(top_n_control_flags)
(allowed_assets)(affiliate_distributions)
)

FC_REFLECT_DERIVED( graphene::chain::account_balance_object,
(graphene::db::object),
(owner)(asset_type)(balance) )

FC_REFLECT_DERIVED( graphene::chain::account_statistics_object,
(graphene::chain::object),
(owner)
(most_recent_op)
(total_ops)(removed_ops)
(total_core_in_orders)
(lifetime_fees_paid)
(pending_fees)(pending_vested_fees)
(last_vote_time)
)

FC_REFLECT_DERIVED( graphene::chain::pending_dividend_payout_balance_for_holder_object,
(graphene::db::object),
(owner)(dividend_holder_asset_type)(dividend_payout_asset_type)(pending_balance) )


GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_object )
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_balance_object )
Expand Down
61 changes: 54 additions & 7 deletions libraries/chain/include/graphene/chain/asset_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,60 @@ namespace graphene { namespace chain {

} } // graphene::chain

FC_REFLECT_TYPENAME( graphene::chain::asset_object )
FC_REFLECT_TYPENAME( graphene::chain::asset_bitasset_data_object )
FC_REFLECT_TYPENAME( graphene::chain::asset_dynamic_data_object )
FC_REFLECT_TYPENAME( graphene::chain::asset_dividend_data_object )
FC_REFLECT_TYPENAME( graphene::chain::lottery_balance_object )
FC_REFLECT_TYPENAME( graphene::chain::sweeps_vesting_balance_object )
FC_REFLECT_TYPENAME( graphene::chain::total_distributed_dividend_balance_object )
FC_REFLECT_DERIVED( graphene::chain::asset_object, (graphene::db::object),
(symbol)
(precision)
(issuer)
(options)
(lottery_options)
(dynamic_asset_data_id)
(bitasset_data_id)
(buyback_account)
(dividend_data_id)
)

FC_REFLECT_DERIVED( graphene::chain::asset_bitasset_data_object, (graphene::db::object),
(feeds)
(current_feed)
(current_feed_publication_time)
(options)
(force_settled_volume)
(is_prediction_market)
(settlement_price)
(settlement_fund)
)

FC_REFLECT_DERIVED( graphene::chain::asset_dynamic_data_object, (graphene::db::object),
(current_supply)(sweeps_tickets_sold)(confidential_supply)(accumulated_fees)(fee_pool) )

FC_REFLECT_DERIVED( graphene::chain::asset_dividend_data_object, (graphene::db::object),
(options)
(last_scheduled_payout_time)
(last_payout_time )
(last_scheduled_distribution_time)
(last_distribution_time)
(dividend_distribution_account)
)


FC_REFLECT_DERIVED( graphene::chain::lottery_balance_object, (graphene::db::object),
(lottery_id)
(balance)
)

FC_REFLECT_DERIVED( graphene::chain::sweeps_vesting_balance_object, (graphene::db::object),
(owner)
(balance)
(asset_id)
(last_claim_date)
)

FC_REFLECT_DERIVED( graphene::chain::total_distributed_dividend_balance_object, (graphene::db::object),
(dividend_holder_asset_type)
(dividend_payout_asset_type)
(balance_at_last_maintenance_interval)
)


GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_object )
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_bitasset_data_object )
Expand Down
6 changes: 2 additions & 4 deletions libraries/chain/include/graphene/chain/balance_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ namespace graphene { namespace chain {
using balance_index = generic_index<balance_object, balance_multi_index_type>;
} }


MAP_OBJECT_ID_TO_TYPE(graphene::chain::balance_object)

FC_REFLECT_TYPENAME( graphene::chain::balance_object )
FC_REFLECT_DERIVED( graphene::chain::balance_object, (graphene::db::object),
(owner)(balance)(vesting_policy)(last_claim_date) )

GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::balance_object )
13 changes: 3 additions & 10 deletions libraries/chain/include/graphene/chain/betting_market_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ namespace fc {

namespace graphene { namespace chain {

FC_DECLARE_EXCEPTION(no_transition, 100000, "Invalid state transition");
class database;

struct by_event_id;
Expand Down Expand Up @@ -717,17 +716,11 @@ inline Stream& operator>>( Stream& s, betting_market_group_object& betting_marke

} } // graphene::chain

FC_REFLECT_TYPENAME( graphene::chain::betting_market_rules_object )
FC_REFLECT_DERIVED( graphene::chain::betting_market_rules_object, (graphene::db::object), (name)(description) )
FC_REFLECT_TYPENAME( graphene::chain::betting_market_group_object )
FC_REFLECT_TYPENAME( graphene::chain::betting_market_object )
FC_REFLECT_TYPENAME( graphene::chain::bet_object )
FC_REFLECT_TYPENAME( graphene::chain::betting_market_position_object )

MAP_OBJECT_ID_TO_TYPE( graphene::chain::betting_market_rules_object )
MAP_OBJECT_ID_TO_TYPE( graphene::chain::betting_market_group_object )
MAP_OBJECT_ID_TO_TYPE( graphene::chain::betting_market_object )
MAP_OBJECT_ID_TO_TYPE( graphene::chain::bet_object )
MAP_OBJECT_ID_TO_TYPE( graphene::chain::betting_market_position_object )
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) )

GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::betting_market_rules_object )
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::betting_market_group_object )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#pragma once
#include <graphene/chain/types.hpp>
#include <graphene/chain/protocol/types.hpp>
#include <graphene/db/object.hpp>

namespace graphene { namespace chain {
Expand All @@ -48,8 +48,6 @@ namespace graphene { namespace chain {

} }

MAP_OBJECT_ID_TO_TYPE(graphene::chain::block_summary_object)

FC_REFLECT_TYPENAME( graphene::chain::block_summary_object )
FC_REFLECT_DERIVED( graphene::chain::block_summary_object, (graphene::db::object), (block_id) )

GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::block_summary_object )
23 changes: 20 additions & 3 deletions libraries/chain/include/graphene/chain/budget_record_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,27 @@ class budget_record_object : public graphene::db::abstract_object<budget_record_

} }

MAP_OBJECT_ID_TO_TYPE(graphene::chain::budget_record_object)
FC_REFLECT_DERIVED(
graphene::chain::budget_record, BOOST_PP_SEQ_NIL,
(time_since_last_budget)
(from_initial_reserve)
(from_accumulated_fees)
(from_unused_witness_budget)
(requested_witness_budget)
(total_budget)
(witness_budget)
(worker_budget)
(leftover_worker_funds)
(supply_delta)
)

FC_REFLECT_DERIVED(
graphene::chain::budget_record_object,
(graphene::db::object),
(time)
(record)
)

FC_REFLECT_TYPENAME( graphene::chain::budget_record )
FC_REFLECT_TYPENAME( graphene::chain::budget_record_object )

GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::budget_record )
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::budget_record_object )
4 changes: 1 addition & 3 deletions libraries/chain/include/graphene/chain/buyback_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ typedef generic_index< buyback_object, buyback_multi_index_type > buyback_index;

} } // graphene::chain

MAP_OBJECT_ID_TO_TYPE(graphene::chain::buyback_object)

FC_REFLECT_TYPENAME( graphene::chain::buyback_object )
FC_REFLECT_DERIVED( graphene::chain::buyback_object, (graphene::db::object), (asset_to_buy) )

GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::buyback_object )
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ class chain_property_object : public abstract_object<chain_property_object>

} }

MAP_OBJECT_ID_TO_TYPE(graphene::chain::chain_property_object)

FC_REFLECT_TYPENAME( graphene::chain::chain_property_object )
FC_REFLECT_DERIVED( graphene::chain::chain_property_object, (graphene::db::object),
(chain_id)
(immutable_parameters)
)

GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::chain_property_object )
Loading

0 comments on commit 72d6442

Please sign in to comment.