Merge branch 'develop' into feature/GRPH-163
This commit is contained in:
commit
0579058792
143 changed files with 3661 additions and 617 deletions
|
|
@ -5,7 +5,6 @@ add_library( graphene_app
|
|||
api.cpp
|
||||
application.cpp
|
||||
database_api.cpp
|
||||
impacted.cpp
|
||||
plugin.cpp
|
||||
config_util.cpp
|
||||
${HEADERS}
|
||||
|
|
@ -14,7 +13,7 @@ add_library( graphene_app
|
|||
|
||||
# need to link graphene_debug_witness because plugins aren't sufficiently isolated #246
|
||||
#target_link_libraries( graphene_app graphene_market_history graphene_account_history graphene_chain fc graphene_db graphene_net graphene_utilities graphene_debug_witness )
|
||||
target_link_libraries( graphene_app graphene_market_history graphene_account_history graphene_accounts_list graphene_affiliate_stats graphene_chain fc graphene_db graphene_net graphene_time graphene_utilities graphene_debug_witness graphene_bookie )
|
||||
target_link_libraries( graphene_app graphene_market_history graphene_account_history graphene_accounts_list graphene_affiliate_stats graphene_chain fc graphene_db graphene_net graphene_time graphene_utilities graphene_debug_witness graphene_bookie graphene_elasticsearch )
|
||||
target_include_directories( graphene_app
|
||||
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../egenesis/include" )
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#include <graphene/app/api.hpp>
|
||||
#include <graphene/app/api_access.hpp>
|
||||
#include <graphene/app/application.hpp>
|
||||
#include <graphene/app/impacted.hpp>
|
||||
#include <graphene/chain/database.hpp>
|
||||
#include <graphene/chain/get_config.hpp>
|
||||
#include <graphene/utilities/key_conversion.hpp>
|
||||
|
|
@ -40,8 +39,19 @@
|
|||
|
||||
#include <fc/crypto/hex.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <fc/rpc/api_connection.hpp>
|
||||
#include <fc/thread/future.hpp>
|
||||
|
||||
template class fc::api<graphene::app::block_api>;
|
||||
template class fc::api<graphene::app::network_broadcast_api>;
|
||||
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::debug_witness::debug_api>;
|
||||
template class fc::api<graphene::app::login_api>;
|
||||
|
||||
|
||||
namespace graphene { namespace app {
|
||||
|
||||
login_api::login_api(application& a)
|
||||
|
|
@ -570,6 +580,18 @@ namespace graphene { namespace app {
|
|||
start = node.operation_id;
|
||||
} catch(...) { return result; }
|
||||
|
||||
if(_app.is_plugin_enabled("elasticsearch")) {
|
||||
auto es = _app.get_plugin<elasticsearch::elasticsearch_plugin>("elasticsearch");
|
||||
if(es.get()->get_running_mode() != elasticsearch::mode::only_save) {
|
||||
if(!_app.elasticsearch_thread)
|
||||
_app.elasticsearch_thread= std::make_shared<fc::thread>("elasticsearch");
|
||||
|
||||
return _app.elasticsearch_thread->async([&es, &account, &stop, &limit, &start]() {
|
||||
return es->get_account_history(account, stop, limit, start);
|
||||
}, "thread invoke for method " BOOST_PP_STRINGIZE(method_name)).wait();
|
||||
}
|
||||
}
|
||||
|
||||
const auto& hist_idx = db.get_index_type<account_transaction_history_index>();
|
||||
const auto& by_op_idx = hist_idx.indices().get<by_op>();
|
||||
auto index_start = by_op_idx.begin();
|
||||
|
|
|
|||
|
|
@ -891,7 +891,8 @@ namespace detail {
|
|||
std::shared_ptr<fc::http::websocket_server> _websocket_server;
|
||||
std::shared_ptr<fc::http::websocket_tls_server> _websocket_tls_server;
|
||||
|
||||
std::map<string, std::shared_ptr<abstract_plugin>> _plugins;
|
||||
std::map<string, std::shared_ptr<abstract_plugin>> _active_plugins;
|
||||
std::map<string, std::shared_ptr<abstract_plugin>> _available_plugins;
|
||||
|
||||
bool _is_finished_syncing = false;
|
||||
};
|
||||
|
|
@ -933,6 +934,7 @@ void application::set_program_options(boost::program_options::options_descriptio
|
|||
("enable-standby-votes-tracking", bpo::value<bool>()->implicit_value(true),
|
||||
"Whether to enable tracking of votes of standby witnesses and committee members. "
|
||||
"Set it to true to provide accurate data to API clients, set to false for slightly better performance.")
|
||||
("plugins", bpo::value<string>(), "Space-separated list of plugins to activate")
|
||||
;
|
||||
command_line_options.add(configuration_file_options);
|
||||
command_line_options.add_options()
|
||||
|
|
@ -978,6 +980,33 @@ void application::initialize(const fc::path& data_dir, const boost::program_opti
|
|||
|
||||
std::exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
std::vector<string> wanted;
|
||||
if( options.count("plugins") )
|
||||
{
|
||||
boost::split(wanted, options.at("plugins").as<std::string>(), [](char c){return c == ' ';});
|
||||
}
|
||||
else
|
||||
{
|
||||
wanted.push_back("witness");
|
||||
wanted.push_back("account_history");
|
||||
wanted.push_back("market_history");
|
||||
wanted.push_back("bookie");
|
||||
}
|
||||
int es_ah_conflict_counter = 0;
|
||||
for (auto& it : wanted)
|
||||
{
|
||||
if(it == "account_history")
|
||||
++es_ah_conflict_counter;
|
||||
if(it == "elasticsearch")
|
||||
++es_ah_conflict_counter;
|
||||
|
||||
if(es_ah_conflict_counter > 1) {
|
||||
elog("Can't start program with elasticsearch and account_history plugin at the same time");
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
if (!it.empty()) enable_plugin(it);
|
||||
}
|
||||
}
|
||||
|
||||
void application::startup()
|
||||
|
|
@ -995,7 +1024,12 @@ void application::startup()
|
|||
|
||||
std::shared_ptr<abstract_plugin> application::get_plugin(const string& name) const
|
||||
{
|
||||
return my->_plugins[name];
|
||||
return my->_active_plugins[name];
|
||||
}
|
||||
|
||||
bool application::is_plugin_enabled(const string& name) const
|
||||
{
|
||||
return !(my->_active_plugins.find(name) == my->_active_plugins.end());
|
||||
}
|
||||
|
||||
net::node_ptr application::p2p_node()
|
||||
|
|
@ -1028,14 +1062,21 @@ bool application::is_finished_syncing() const
|
|||
return my->_is_finished_syncing;
|
||||
}
|
||||
|
||||
void graphene::app::application::add_plugin(const string& name, std::shared_ptr<graphene::app::abstract_plugin> p)
|
||||
void graphene::app::application::enable_plugin(const string& name)
|
||||
{
|
||||
my->_plugins[name] = p;
|
||||
FC_ASSERT(my->_available_plugins[name], "Unknown plugin '" + name + "'");
|
||||
my->_active_plugins[name] = my->_available_plugins[name];
|
||||
my->_active_plugins[name]->plugin_set_app(this);
|
||||
}
|
||||
|
||||
void graphene::app::application::add_available_plugin(std::shared_ptr<graphene::app::abstract_plugin> p)
|
||||
{
|
||||
my->_available_plugins[p->plugin_name()] = p;
|
||||
}
|
||||
|
||||
void application::shutdown_plugins()
|
||||
{
|
||||
for( auto& entry : my->_plugins )
|
||||
for( auto& entry : my->_active_plugins )
|
||||
entry.second->plugin_shutdown();
|
||||
return;
|
||||
}
|
||||
|
|
@ -1049,14 +1090,14 @@ void application::shutdown()
|
|||
|
||||
void application::initialize_plugins( const boost::program_options::variables_map& options )
|
||||
{
|
||||
for( auto& entry : my->_plugins )
|
||||
for( auto& entry : my->_active_plugins )
|
||||
entry.second->plugin_initialize( options );
|
||||
return;
|
||||
}
|
||||
|
||||
void application::startup_plugins()
|
||||
{
|
||||
for( auto& entry : my->_plugins )
|
||||
for( auto& entry : my->_active_plugins )
|
||||
entry.second->plugin_startup();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,11 +26,15 @@
|
|||
#include <graphene/chain/get_config.hpp>
|
||||
#include <graphene/chain/tournament_object.hpp>
|
||||
#include <graphene/chain/account_object.hpp>
|
||||
#include <graphene/chain/protocol/address.hpp>
|
||||
#include <graphene/chain/pts_address.hpp>
|
||||
|
||||
#include <fc/bloom_filter.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <fc/crypto/hex.hpp>
|
||||
#include <fc/rpc/api_connection.hpp>
|
||||
#include <fc/uint128.hpp>
|
||||
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/rational.hpp>
|
||||
|
|
@ -45,6 +49,8 @@
|
|||
|
||||
typedef std::map< std::pair<graphene::chain::asset_id_type, graphene::chain::asset_id_type>, std::vector<fc::variant> > market_queue_type;
|
||||
|
||||
template class fc::api<graphene::app::database_api>;
|
||||
|
||||
namespace graphene { namespace app {
|
||||
|
||||
class database_api_impl : public std::enable_shared_from_this<database_api_impl>
|
||||
|
|
@ -2272,7 +2278,28 @@ graphene::app::gpos_info database_api_impl::get_gpos_info(const account_id_type
|
|||
}
|
||||
#endif
|
||||
|
||||
vector<vesting_balance_object> account_vbos;
|
||||
const time_point_sec now = _db.head_block_time();
|
||||
auto vesting_range = _db.get_index_type<vesting_balance_index>().indices().get<by_account>().equal_range(account);
|
||||
std::for_each(vesting_range.first, vesting_range.second,
|
||||
[&account_vbos, now](const vesting_balance_object& balance) {
|
||||
if(balance.balance.amount > 0 && balance.balance_type == vesting_balance_type::gpos
|
||||
&& balance.balance.asset_id == asset_id_type())
|
||||
account_vbos.emplace_back(balance);
|
||||
});
|
||||
|
||||
share_type allowed_withdraw_amount = 0, account_vested_balance = 0;
|
||||
|
||||
for (const vesting_balance_object& vesting_balance_obj : account_vbos)
|
||||
{
|
||||
account_vested_balance += vesting_balance_obj.balance.amount;
|
||||
if(vesting_balance_obj.is_withdraw_allowed(_db.head_block_time(), vesting_balance_obj.balance.amount))
|
||||
allowed_withdraw_amount += vesting_balance_obj.balance.amount;
|
||||
}
|
||||
|
||||
result.total_amount = total_amount;
|
||||
result.allowed_withdraw_amount = allowed_withdraw_amount;
|
||||
result.account_vested_balance = account_vested_balance;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,315 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2015 Cryptonomex, Inc., 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 <graphene/chain/protocol/authority.hpp>
|
||||
#include <graphene/app/impacted.hpp>
|
||||
|
||||
namespace graphene { namespace app {
|
||||
|
||||
using namespace fc;
|
||||
using namespace graphene::chain;
|
||||
|
||||
// TODO: Review all of these, especially no-ops
|
||||
struct get_impacted_account_visitor
|
||||
{
|
||||
flat_set<account_id_type>& _impacted;
|
||||
get_impacted_account_visitor( flat_set<account_id_type>& impact ):_impacted(impact) {}
|
||||
typedef void result_type;
|
||||
|
||||
void operator()( const transfer_operation& op )
|
||||
{
|
||||
_impacted.insert( op.to );
|
||||
}
|
||||
|
||||
void operator()( const asset_claim_fees_operation& op ){}
|
||||
void operator()( const limit_order_create_operation& op ) {}
|
||||
void operator()( const limit_order_cancel_operation& op )
|
||||
{
|
||||
_impacted.insert( op.fee_paying_account );
|
||||
}
|
||||
void operator()( const call_order_update_operation& op ) {}
|
||||
void operator()( const fill_order_operation& op )
|
||||
{
|
||||
_impacted.insert( op.account_id );
|
||||
}
|
||||
|
||||
void operator()( const account_create_operation& op )
|
||||
{
|
||||
_impacted.insert( op.registrar );
|
||||
_impacted.insert( op.referrer );
|
||||
add_authority_accounts( _impacted, op.owner );
|
||||
add_authority_accounts( _impacted, op.active );
|
||||
}
|
||||
|
||||
void operator()( const account_update_operation& op )
|
||||
{
|
||||
_impacted.insert( op.account );
|
||||
if( op.owner )
|
||||
add_authority_accounts( _impacted, *(op.owner) );
|
||||
if( op.active )
|
||||
add_authority_accounts( _impacted, *(op.active) );
|
||||
}
|
||||
|
||||
void operator()( const account_whitelist_operation& op )
|
||||
{
|
||||
_impacted.insert( op.account_to_list );
|
||||
}
|
||||
|
||||
void operator()( const account_upgrade_operation& op ) {}
|
||||
void operator()( const account_transfer_operation& op )
|
||||
{
|
||||
_impacted.insert( op.new_owner );
|
||||
}
|
||||
|
||||
void operator()( const asset_create_operation& op ) {}
|
||||
void operator()( const asset_update_operation& op )
|
||||
{
|
||||
if( op.new_issuer )
|
||||
_impacted.insert( *(op.new_issuer) );
|
||||
}
|
||||
|
||||
void operator()( const asset_update_bitasset_operation& op ) {}
|
||||
void operator()( const asset_update_dividend_operation& op ) {}
|
||||
void operator()( const asset_dividend_distribution_operation& op )
|
||||
{
|
||||
_impacted.insert( op.account_id );
|
||||
}
|
||||
|
||||
void operator()( const asset_update_feed_producers_operation& op ) {}
|
||||
|
||||
void operator()( const asset_issue_operation& op )
|
||||
{
|
||||
_impacted.insert( op.issue_to_account );
|
||||
}
|
||||
|
||||
void operator()( const asset_reserve_operation& op ) {}
|
||||
void operator()( const asset_fund_fee_pool_operation& op ) {}
|
||||
void operator()( const asset_settle_operation& op ) {}
|
||||
void operator()( const asset_global_settle_operation& op ) {}
|
||||
void operator()( const asset_publish_feed_operation& op ) {}
|
||||
void operator()( const witness_create_operation& op )
|
||||
{
|
||||
_impacted.insert( op.witness_account );
|
||||
}
|
||||
void operator()( const witness_update_operation& op )
|
||||
{
|
||||
_impacted.insert( op.witness_account );
|
||||
}
|
||||
|
||||
void operator()( const proposal_create_operation& op )
|
||||
{
|
||||
vector<authority> other;
|
||||
for( const auto& proposed_op : op.proposed_ops )
|
||||
operation_get_required_authorities( proposed_op.op, _impacted, _impacted, other );
|
||||
for( auto& o : other )
|
||||
add_authority_accounts( _impacted, o );
|
||||
}
|
||||
|
||||
void operator()( const proposal_update_operation& op ) {}
|
||||
void operator()( const proposal_delete_operation& op ) {}
|
||||
|
||||
void operator()( const withdraw_permission_create_operation& op )
|
||||
{
|
||||
_impacted.insert( op.authorized_account );
|
||||
}
|
||||
|
||||
void operator()( const withdraw_permission_update_operation& op )
|
||||
{
|
||||
_impacted.insert( op.authorized_account );
|
||||
}
|
||||
|
||||
void operator()( const withdraw_permission_claim_operation& op )
|
||||
{
|
||||
_impacted.insert( op.withdraw_from_account );
|
||||
}
|
||||
|
||||
void operator()( const withdraw_permission_delete_operation& op )
|
||||
{
|
||||
_impacted.insert( op.authorized_account );
|
||||
}
|
||||
|
||||
void operator()( const committee_member_create_operation& op )
|
||||
{
|
||||
_impacted.insert( op.committee_member_account );
|
||||
}
|
||||
void operator()( const committee_member_update_operation& op )
|
||||
{
|
||||
_impacted.insert( op.committee_member_account );
|
||||
}
|
||||
void operator()( const committee_member_update_global_parameters_operation& op ) {}
|
||||
|
||||
void operator()( const vesting_balance_create_operation& op )
|
||||
{
|
||||
_impacted.insert( op.owner );
|
||||
}
|
||||
|
||||
void operator()( const vesting_balance_withdraw_operation& op ) {}
|
||||
void operator()( const worker_create_operation& op ) {}
|
||||
void operator()( const custom_operation& op ) {}
|
||||
void operator()( const assert_operation& op ) {}
|
||||
void operator()( const balance_claim_operation& op ) {}
|
||||
|
||||
void operator()( const override_transfer_operation& op )
|
||||
{
|
||||
_impacted.insert( op.to );
|
||||
_impacted.insert( op.from );
|
||||
_impacted.insert( op.issuer );
|
||||
}
|
||||
|
||||
void operator()( const transfer_to_blind_operation& op )
|
||||
{
|
||||
_impacted.insert( op.from );
|
||||
for( const auto& out : op.outputs )
|
||||
add_authority_accounts( _impacted, out.owner );
|
||||
}
|
||||
|
||||
void operator()( const blind_transfer_operation& op )
|
||||
{
|
||||
for( const auto& in : op.inputs )
|
||||
add_authority_accounts( _impacted, in.owner );
|
||||
for( const auto& out : op.outputs )
|
||||
add_authority_accounts( _impacted, out.owner );
|
||||
}
|
||||
|
||||
void operator()( const transfer_from_blind_operation& op )
|
||||
{
|
||||
_impacted.insert( op.to );
|
||||
for( const auto& in : op.inputs )
|
||||
add_authority_accounts( _impacted, in.owner );
|
||||
}
|
||||
|
||||
void operator()( const asset_settle_cancel_operation& op )
|
||||
{
|
||||
_impacted.insert( op.account );
|
||||
}
|
||||
|
||||
void operator()( const fba_distribute_operation& op )
|
||||
{
|
||||
_impacted.insert( op.account_id );
|
||||
}
|
||||
|
||||
void operator()( const sport_create_operation& op ) {}
|
||||
void operator()( const sport_update_operation& op ) {}
|
||||
void operator()( const sport_delete_operation& op ) {}
|
||||
void operator()( const event_group_create_operation& op ) {}
|
||||
void operator()( const event_group_update_operation& op ) {}
|
||||
void operator()( const event_group_delete_operation& op ) {}
|
||||
void operator()( const event_create_operation& op ) {}
|
||||
void operator()( const event_update_operation& op ) {}
|
||||
void operator()( const event_update_status_operation& op ) {}
|
||||
void operator()( const betting_market_rules_create_operation& op ) {}
|
||||
void operator()( const betting_market_rules_update_operation& op ) {}
|
||||
void operator()( const betting_market_group_create_operation& op ) {}
|
||||
void operator()( const betting_market_group_update_operation& op ) {}
|
||||
void operator()( const betting_market_create_operation& op ) {}
|
||||
void operator()( const betting_market_update_operation& op ) {}
|
||||
void operator()( const betting_market_group_resolve_operation& op ) {}
|
||||
void operator()( const betting_market_group_cancel_unmatched_bets_operation& op ) {}
|
||||
|
||||
void operator()( const bet_place_operation& op )
|
||||
{
|
||||
_impacted.insert( op.bettor_id );
|
||||
}
|
||||
void operator()( const bet_cancel_operation& op )
|
||||
{
|
||||
_impacted.insert( op.bettor_id );
|
||||
}
|
||||
void operator()( const bet_canceled_operation& op )
|
||||
{
|
||||
_impacted.insert( op.bettor_id );
|
||||
}
|
||||
void operator()( const bet_adjusted_operation& op )
|
||||
{
|
||||
_impacted.insert( op.bettor_id );
|
||||
}
|
||||
void operator()( const bet_matched_operation& op )
|
||||
{
|
||||
_impacted.insert( op.bettor_id );
|
||||
}
|
||||
void operator()( const betting_market_group_resolved_operation& op )
|
||||
{
|
||||
_impacted.insert( op.bettor_id );
|
||||
}
|
||||
|
||||
void operator()( const tournament_create_operation& op )
|
||||
{
|
||||
_impacted.insert( op.creator );
|
||||
_impacted.insert( op.options.whitelist.begin(), op.options.whitelist.end() );
|
||||
}
|
||||
void operator()( const tournament_join_operation& op )
|
||||
{
|
||||
_impacted.insert( op.payer_account_id );
|
||||
_impacted.insert( op.player_account_id );
|
||||
}
|
||||
void operator()( const tournament_leave_operation& op )
|
||||
{
|
||||
//if account canceling registration is not the player, it must be the payer
|
||||
if (op.canceling_account_id != op.player_account_id)
|
||||
_impacted.erase( op.canceling_account_id );
|
||||
_impacted.erase( op.player_account_id );
|
||||
}
|
||||
void operator()( const game_move_operation& op )
|
||||
{
|
||||
_impacted.insert( op.player_account_id );
|
||||
}
|
||||
void operator()( const tournament_payout_operation& op )
|
||||
{
|
||||
_impacted.insert( op.payout_account_id );
|
||||
}
|
||||
void operator()( const affiliate_payout_operation& op )
|
||||
{
|
||||
_impacted.insert( op.affiliate );
|
||||
}
|
||||
void operator()( const affiliate_referral_payout_operation& op ) { }
|
||||
void operator()( const lottery_asset_create_operation& op) { }
|
||||
void operator()( const ticket_purchase_operation& op )
|
||||
{
|
||||
_impacted.insert( op.buyer );
|
||||
}
|
||||
void operator()( const lottery_reward_operation& op ) {
|
||||
_impacted.insert( op.winner );
|
||||
}
|
||||
void operator()( const lottery_end_operation& op ) {
|
||||
for( auto participant : op.participants ) {
|
||||
_impacted.insert(participant.first);
|
||||
}
|
||||
}
|
||||
void operator()( const sweeps_vesting_claim_operation& op ) {
|
||||
_impacted.insert( op.account );
|
||||
}
|
||||
};
|
||||
|
||||
void operation_get_impacted_accounts( const operation& op, flat_set<account_id_type>& result )
|
||||
{
|
||||
get_impacted_account_visitor vtor = get_impacted_account_visitor( result );
|
||||
op.visit( vtor );
|
||||
}
|
||||
|
||||
void transaction_get_impacted_accounts( const transaction& tx, flat_set<account_id_type>& result )
|
||||
{
|
||||
for( const auto& op : tx.operations )
|
||||
operation_get_impacted_accounts( op, result );
|
||||
}
|
||||
|
||||
} }
|
||||
|
|
@ -31,6 +31,8 @@
|
|||
#include <graphene/market_history/market_history_plugin.hpp>
|
||||
#include <graphene/accounts_list/accounts_list_plugin.hpp>
|
||||
|
||||
#include <graphene/elasticsearch/elasticsearch_plugin.hpp>
|
||||
|
||||
#include <graphene/debug_witness/debug_api.hpp>
|
||||
#include <graphene/affiliate_stats/affiliate_stats_api.hpp>
|
||||
#include <graphene/bookie/bookie_api.hpp>
|
||||
|
|
@ -357,7 +359,17 @@ namespace graphene { namespace app {
|
|||
graphene::chain::database& _db;
|
||||
graphene::app::database_api database_api;
|
||||
};
|
||||
} } // graphene::app
|
||||
|
||||
extern template class fc::api<graphene::app::block_api>;
|
||||
extern template class fc::api<graphene::app::network_broadcast_api>;
|
||||
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::debug_witness::debug_api>;
|
||||
|
||||
namespace graphene { namespace app {
|
||||
/**
|
||||
* @brief The login_api class implements the bottom layer of the RPC API
|
||||
*
|
||||
|
|
@ -419,6 +431,8 @@ namespace graphene { namespace app {
|
|||
|
||||
}} // graphene::app
|
||||
|
||||
extern template class fc::api<graphene::app::login_api>;
|
||||
|
||||
FC_REFLECT( graphene::app::network_broadcast_api::transaction_confirmation,
|
||||
(id)(block_num)(trx_num)(trx) )
|
||||
FC_REFLECT( graphene::app::verify_range_result,
|
||||
|
|
|
|||
|
|
@ -56,14 +56,15 @@ namespace graphene { namespace app {
|
|||
auto plug = std::make_shared<PluginType>();
|
||||
plug->plugin_set_app(this);
|
||||
|
||||
boost::program_options::options_description plugin_cli_options("Options for plugin " + plug->plugin_name()), plugin_cfg_options;
|
||||
boost::program_options::options_description plugin_cli_options(plug->plugin_name() + " plugin. " + plug->plugin_description() + "\nOptions"), plugin_cfg_options;
|
||||
//boost::program_options::options_description plugin_cli_options("Options for plugin " + plug->plugin_name()), plugin_cfg_options;
|
||||
plug->plugin_set_program_options(plugin_cli_options, plugin_cfg_options);
|
||||
if( !plugin_cli_options.options().empty() )
|
||||
_cli_options.add(plugin_cli_options);
|
||||
if( !plugin_cfg_options.options().empty() )
|
||||
_cfg_options.add(plugin_cfg_options);
|
||||
|
||||
add_plugin( plug->plugin_name(), plug );
|
||||
add_available_plugin( plug );
|
||||
return plug;
|
||||
}
|
||||
std::shared_ptr<abstract_plugin> get_plugin( const string& name )const;
|
||||
|
|
@ -88,8 +89,14 @@ namespace graphene { namespace app {
|
|||
/// Emitted when syncing finishes (is_finished_syncing will return true)
|
||||
boost::signals2::signal<void()> syncing_finished;
|
||||
|
||||
private:
|
||||
void add_plugin( const string& name, std::shared_ptr<abstract_plugin> p );
|
||||
void enable_plugin( const string& name );
|
||||
|
||||
bool is_plugin_enabled(const string& name) const;
|
||||
|
||||
std::shared_ptr<fc::thread> elasticsearch_thread;
|
||||
|
||||
private:
|
||||
void add_available_plugin( std::shared_ptr<abstract_plugin> p );
|
||||
std::shared_ptr<detail::application_impl> my;
|
||||
|
||||
boost::program_options::options_description _cli_options;
|
||||
|
|
|
|||
|
|
@ -119,7 +119,9 @@ struct gpos_info {
|
|||
asset award;
|
||||
share_type total_amount;
|
||||
uint32_t current_subperiod;
|
||||
fc::time_point_sec last_voted_time;
|
||||
fc::time_point_sec last_voted_time;
|
||||
share_type allowed_withdraw_amount;
|
||||
share_type account_vested_balance;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -715,12 +717,14 @@ private:
|
|||
|
||||
} }
|
||||
|
||||
extern template class fc::api<graphene::app::database_api>;
|
||||
|
||||
FC_REFLECT( graphene::app::order, (price)(quote)(base) );
|
||||
FC_REFLECT( graphene::app::order_book, (base)(quote)(bids)(asks) );
|
||||
FC_REFLECT( graphene::app::market_ticker, (base)(quote)(latest)(lowest_ask)(highest_bid)(percent_change)(base_volume)(quote_volume) );
|
||||
FC_REFLECT( graphene::app::market_volume, (base)(quote)(base_volume)(quote_volume) );
|
||||
FC_REFLECT( graphene::app::market_trade, (date)(price)(amount)(value) );
|
||||
FC_REFLECT( graphene::app::gpos_info, (vesting_factor)(award)(total_amount)(current_subperiod)(last_voted_time) );
|
||||
FC_REFLECT( graphene::app::gpos_info, (vesting_factor)(award)(total_amount)(current_subperiod)(last_voted_time)(allowed_withdraw_amount)(account_vested_balance) );
|
||||
|
||||
|
||||
FC_API(graphene::app::database_api,
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class abstract_plugin
|
|||
public:
|
||||
virtual ~abstract_plugin(){}
|
||||
virtual std::string plugin_name()const = 0;
|
||||
virtual std::string plugin_description()const = 0;
|
||||
|
||||
/**
|
||||
* @brief Perform early startup routines and register plugin indexes, callbacks, etc.
|
||||
|
|
@ -100,6 +101,7 @@ class plugin : public abstract_plugin
|
|||
virtual ~plugin() override;
|
||||
|
||||
virtual std::string plugin_name()const override;
|
||||
virtual std::string plugin_description()const override;
|
||||
virtual void plugin_initialize( const boost::program_options::variables_map& options ) override;
|
||||
virtual void plugin_startup() override;
|
||||
virtual void plugin_shutdown() override;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ std::string plugin::plugin_name()const
|
|||
return "<unknown plugin>";
|
||||
}
|
||||
|
||||
std::string plugin::plugin_description()const
|
||||
{
|
||||
return "<no description>";
|
||||
}
|
||||
|
||||
void plugin::plugin_initialize( const boost::program_options::variables_map& options )
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ add_library( graphene_chain
|
|||
protocol/confidential.cpp
|
||||
protocol/vote.cpp
|
||||
protocol/tournament.cpp
|
||||
protocol/small_ops.cpp
|
||||
|
||||
genesis_state.cpp
|
||||
get_config.cpp
|
||||
|
|
@ -93,6 +94,7 @@ add_library( graphene_chain
|
|||
fba_object.cpp
|
||||
proposal_object.cpp
|
||||
vesting_balance_object.cpp
|
||||
small_objects.cpp
|
||||
|
||||
block_database.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -261,8 +261,6 @@ void_result account_update_evaluator::do_evaluate( const account_update_operatio
|
|||
FC_ASSERT( !o.extensions.value.owner_special_authority.valid() );
|
||||
FC_ASSERT( !o.extensions.value.active_special_authority.valid() );
|
||||
}
|
||||
if( d.head_block_time() < HARDFORK_GPOS_TIME )
|
||||
FC_ASSERT( !o.extensions.value.update_last_voting_time.valid() );
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <graphene/chain/account_object.hpp>
|
||||
#include <graphene/chain/asset_object.hpp>
|
||||
#include <graphene/chain/database.hpp>
|
||||
#include <graphene/chain/hardfork.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
#include <fc/uint128.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
@ -320,3 +320,8 @@ const account_balance_object* balances_by_account_index::get_account_balance( co
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_balance_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_statistics_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::pending_dividend_payout_balance_for_holder_object )
|
||||
|
|
|
|||
|
|
@ -24,10 +24,9 @@
|
|||
#include <graphene/chain/asset_object.hpp>
|
||||
#include <graphene/chain/database.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
#include <fc/uint128.hpp>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
using namespace graphene::chain;
|
||||
|
||||
share_type asset_bitasset_data_object::max_force_settlement_volume(share_type current_supply) const
|
||||
|
|
@ -296,3 +295,11 @@ void sweeps_vesting_balance_object::adjust_balance( const asset& delta )
|
|||
FC_ASSERT( delta.asset_id == asset_id );
|
||||
balance += delta.amount.value;
|
||||
}
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_dynamic_data_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_bitasset_data_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_dividend_data_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::total_distributed_dividend_balance_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::lottery_balance_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::sweeps_vesting_balance_object )
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <graphene/chain/balance_evaluator.hpp>
|
||||
#include <graphene/chain/pts_address.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
|
|||
|
|
@ -336,8 +336,6 @@ processed_transaction database::validate_transaction( const signed_transaction&
|
|||
|
||||
processed_transaction database::push_proposal(const proposal_object& proposal)
|
||||
{ try {
|
||||
FC_ASSERT( _undo_db.size() < _undo_db.max_size(), "Undo database is full!" );
|
||||
|
||||
transaction_evaluation_state eval_state(this);
|
||||
eval_state._is_proposed_trx = true;
|
||||
|
||||
|
|
@ -347,6 +345,8 @@ processed_transaction database::push_proposal(const proposal_object& proposal)
|
|||
size_t old_applied_ops_size = _applied_ops.size();
|
||||
|
||||
try {
|
||||
if( _undo_db.size() >= _undo_db.max_size() )
|
||||
_undo_db.set_max_size( _undo_db.size() + 1 );
|
||||
auto session = _undo_db.start_undo_session(true);
|
||||
for( auto& op : proposal.proposed_transaction.operations )
|
||||
eval_state.operation_results.emplace_back(apply_operation(eval_state, op));
|
||||
|
|
|
|||
|
|
@ -1560,11 +1560,19 @@ void database::perform_chain_maintenance(const signed_block& next_block, const g
|
|||
|
||||
if(d.head_block_time() >= HARDFORK_GPOS_TIME)
|
||||
{
|
||||
if (itr == vesting_amounts.end())
|
||||
if (itr == vesting_amounts.end() && d.head_block_time() >= (HARDFORK_GPOS_TIME + props.parameters.gpos_subperiod()/2))
|
||||
return;
|
||||
|
||||
auto vesting_factor = d.calculate_vesting_factor(stake_account);
|
||||
voting_stake = (uint64_t)floor(voting_stake * vesting_factor);
|
||||
|
||||
//Include votes(based on stake) for the period of gpos_subperiod()/2 as system has zero votes on GPOS activation
|
||||
if(d.head_block_time() < (HARDFORK_GPOS_TIME + props.parameters.gpos_subperiod()/2))
|
||||
{
|
||||
voting_stake += stats.total_core_in_orders.value
|
||||
+ (stake_account.cashback_vb.valid() ? (*stake_account.cashback_vb)(d).balance.amount.value : 0)
|
||||
+ d.get_balance(stake_account.get_id(), asset_id_type()).amount.value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1644,6 +1652,8 @@ void database::perform_chain_maintenance(const signed_block& next_block, const g
|
|||
p.pending_parameters->extensions.value.permitted_betting_odds_increments = p.parameters.extensions.value.permitted_betting_odds_increments;
|
||||
if( !p.pending_parameters->extensions.value.live_betting_delay_time.valid() )
|
||||
p.pending_parameters->extensions.value.live_betting_delay_time = p.parameters.extensions.value.live_betting_delay_time;
|
||||
if( !p.pending_parameters->extensions.value.gpos_period_start.valid() )
|
||||
p.pending_parameters->extensions.value.gpos_period_start = p.parameters.extensions.value.gpos_period_start;
|
||||
if( !p.pending_parameters->extensions.value.gpos_period.valid() )
|
||||
p.pending_parameters->extensions.value.gpos_period = p.parameters.extensions.value.gpos_period;
|
||||
if( !p.pending_parameters->extensions.value.gpos_subperiod.valid() )
|
||||
|
|
|
|||
|
|
@ -34,6 +34,13 @@
|
|||
#include <graphene/chain/market_object.hpp>
|
||||
#include <graphene/chain/committee_member_object.hpp>
|
||||
#include <graphene/chain/exceptions.hpp>
|
||||
#include <graphene/chain/witness_object.hpp>
|
||||
#include <graphene/chain/proposal_object.hpp>
|
||||
#include <graphene/chain/operation_history_object.hpp>
|
||||
#include <graphene/chain/vesting_balance_object.hpp>
|
||||
#include <graphene/chain/transaction_object.hpp>
|
||||
#include <graphene/chain/impacted.hpp>
|
||||
|
||||
|
||||
using namespace fc;
|
||||
using namespace graphene::chain;
|
||||
|
|
@ -288,13 +295,13 @@ struct get_impacted_account_visitor
|
|||
}
|
||||
};
|
||||
|
||||
void operation_get_impacted_accounts( const operation& op, flat_set<account_id_type>& result )
|
||||
void graphene::chain::operation_get_impacted_accounts( const operation& op, flat_set<account_id_type>& result )
|
||||
{
|
||||
get_impacted_account_visitor vtor = get_impacted_account_visitor( result );
|
||||
op.visit( vtor );
|
||||
}
|
||||
|
||||
void transaction_get_impacted_accounts( const transaction& tx, flat_set<account_id_type>& result )
|
||||
void graphene::chain::transaction_get_impacted_accounts( const transaction& tx, flat_set<account_id_type>& result )
|
||||
{
|
||||
for( const auto& op : tx.operations )
|
||||
operation_get_impacted_accounts( op, result );
|
||||
|
|
|
|||
|
|
@ -36,3 +36,72 @@ chain_id_type genesis_state_type::compute_chain_id() const
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_account_type, BOOST_PP_SEQ_NIL, (name)(owner_key)(active_key)(is_lifetime_member))
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_asset_type, BOOST_PP_SEQ_NIL,
|
||||
(symbol)(issuer_name)(description)(precision)(max_supply)(accumulated_fees)(is_bitasset)(collateral_records))
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position, BOOST_PP_SEQ_NIL,
|
||||
(owner)(collateral)(debt))
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_balance_type, BOOST_PP_SEQ_NIL,
|
||||
(owner)(asset_symbol)(amount))
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_vesting_balance_type, BOOST_PP_SEQ_NIL,
|
||||
(owner)(asset_symbol)(amount)(begin_timestamp)(vesting_cliff_seconds)(vesting_duration_seconds)(begin_balance))
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_witness_type, BOOST_PP_SEQ_NIL, (owner_name)(block_signing_key))
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_committee_member_type, BOOST_PP_SEQ_NIL, (owner_name))
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_worker_type, BOOST_PP_SEQ_NIL, (owner_name)(daily_pay))
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type::initial_authority, BOOST_PP_SEQ_NIL,
|
||||
(weight_threshold)
|
||||
(account_auths)
|
||||
(key_auths)
|
||||
(address_auths))
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type::initial_cdd_vesting_policy, BOOST_PP_SEQ_NIL,
|
||||
(vesting_seconds)
|
||||
(coin_seconds_earned)
|
||||
(start_claim)
|
||||
(coin_seconds_earned_last_update))
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type::initial_linear_vesting_policy, BOOST_PP_SEQ_NIL,
|
||||
(begin_timestamp)
|
||||
(vesting_cliff_seconds)
|
||||
(vesting_duration_seconds)
|
||||
(begin_balance))
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type::initial_vesting_balance, BOOST_PP_SEQ_NIL,
|
||||
(asset_symbol)
|
||||
(amount)
|
||||
(policy_type)
|
||||
(policy))
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type, BOOST_PP_SEQ_NIL,
|
||||
(name)
|
||||
(owner_authority)
|
||||
(active_authority)
|
||||
(core_balance)
|
||||
(vesting_balances))
|
||||
|
||||
FC_REFLECT_DERIVED_NO_TYPENAME(graphene::chain::genesis_state_type, BOOST_PP_SEQ_NIL,
|
||||
(initial_timestamp)(max_core_supply)(initial_parameters)(initial_bts_accounts)(initial_accounts)(initial_assets)(initial_balances)
|
||||
(initial_vesting_balances)(initial_active_witnesses)(initial_witness_candidates)
|
||||
(initial_committee_candidates)(initial_worker_candidates)
|
||||
(initial_chain_id)
|
||||
(immutable_parameters))
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_account_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_asset_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_balance_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_vesting_balance_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_witness_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_committee_member_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_worker_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_bts_account_type::initial_authority)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_bts_account_type::initial_cdd_vesting_policy)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_bts_account_type::initial_linear_vesting_policy)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_bts_account_type::initial_vesting_balance)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type::initial_bts_account_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::genesis_state_type)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// GPOS HARDFORK Thursday, October 1, 2020 05:00:00 AM GMT
|
||||
// GPOS HARDFORK Monday, 6 January 2020 01:00:00 GMT
|
||||
#ifndef HARDFORK_GPOS_TIME
|
||||
#define HARDFORK_GPOS_TIME (fc::time_point_sec( 1601528400 ))
|
||||
#define HARDFORK_GPOS_TIME (fc::time_point_sec( 1578272400 ))
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,8 +22,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/operations.hpp>
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
#include <graphene/db/generic_index.hpp>
|
||||
#include <graphene/chain/protocol/account.hpp>
|
||||
#include <boost/multi_index/composite_key.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
@ -574,4 +575,7 @@ FC_REFLECT_DERIVED( graphene::chain::pending_dividend_payout_balance_for_holder_
|
|||
(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 )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_statistics_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::pending_dividend_payout_balance_for_holder_object )
|
||||
|
|
|
|||
|
|
@ -22,10 +22,11 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
#include <graphene/db/generic_index.hpp>
|
||||
#include <graphene/db/flat_index.hpp>
|
||||
#include <graphene/chain/protocol/asset_ops.hpp>
|
||||
#include <boost/multi_index/composite_key.hpp>
|
||||
#include <graphene/db/flat_index.hpp>
|
||||
#include <graphene/db/generic_index.hpp>
|
||||
|
||||
/**
|
||||
* @defgroup prediction_market Prediction Market
|
||||
|
|
@ -38,11 +39,10 @@
|
|||
*/
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
class account_object;
|
||||
class database;
|
||||
class transaction_evaluation_state;
|
||||
using namespace graphene::db;
|
||||
|
||||
|
||||
/**
|
||||
* @brief tracks the asset information that changes frequently
|
||||
* @ingroup object
|
||||
|
|
@ -118,9 +118,9 @@ namespace graphene { namespace chain {
|
|||
/// Convert an asset to a textual representation with symbol, i.e. "123.45 USD"
|
||||
string amount_to_pretty_string(const asset &amount)const
|
||||
{ FC_ASSERT(amount.asset_id == id); return amount_to_pretty_string(amount.amount); }
|
||||
|
||||
|
||||
uint32_t get_issuer_num()const
|
||||
{ return issuer.instance.value; }
|
||||
{ return issuer.instance.value; }
|
||||
/// Ticker symbol for this asset, i.e. "USD"
|
||||
string symbol;
|
||||
/// Maximum number of digits after the decimal point (must be <= 12)
|
||||
|
|
@ -138,7 +138,7 @@ namespace graphene { namespace chain {
|
|||
map< account_id_type, vector< uint16_t > > distribute_winners_part( database& db );
|
||||
void distribute_sweeps_holders_part( database& db );
|
||||
void end_lottery( database& db );
|
||||
|
||||
|
||||
/// Current supply, fee pool, and collected fees are stored in a separate object as they change frequently.
|
||||
asset_dynamic_data_id_type dynamic_asset_data_id;
|
||||
/// Extra data associated with BitAssets. This field is non-null if and only if is_market_issued() returns true
|
||||
|
|
@ -150,7 +150,7 @@ namespace graphene { namespace chain {
|
|||
optional<asset_dividend_data_id_type> dividend_data_id;
|
||||
|
||||
asset_id_type get_id()const { return id; }
|
||||
|
||||
|
||||
void validate()const
|
||||
{
|
||||
// UIAs may not be prediction markets, have force settlement, or global settlements
|
||||
|
|
@ -174,7 +174,7 @@ namespace graphene { namespace chain {
|
|||
{ return db.get(dynamic_asset_data_id); }
|
||||
|
||||
/**
|
||||
* The total amount of an asset that is reserved for future issuance.
|
||||
* The total amount of an asset that is reserved for future issuance.
|
||||
*/
|
||||
template<class DB>
|
||||
share_type reserved( const DB& db )const
|
||||
|
|
@ -254,7 +254,7 @@ namespace graphene { namespace chain {
|
|||
else
|
||||
return current_feed_publication_time + options.feed_lifetime_sec;
|
||||
}
|
||||
|
||||
|
||||
bool feed_is_expired_before_hardfork_615(time_point_sec current_time)const
|
||||
{ return feed_expiration_time() >= current_time; }
|
||||
bool feed_is_expired(time_point_sec current_time)const
|
||||
|
|
@ -378,7 +378,7 @@ namespace graphene { namespace chain {
|
|||
/// This field is reset any time the dividend_asset_options are updated
|
||||
fc::optional<time_point_sec> last_scheduled_payout_time;
|
||||
|
||||
/// The time payouts on this asset were last processed
|
||||
/// The time payouts on this asset were last processed
|
||||
/// (this should be the maintenance interval at or after last_scheduled_payout_time)
|
||||
/// This can be displayed for the user
|
||||
fc::optional<time_point_sec> last_payout_time;
|
||||
|
|
@ -405,7 +405,7 @@ namespace graphene { namespace chain {
|
|||
typedef generic_index<asset_dividend_data_object, asset_dividend_data_object_multi_index_type> asset_dividend_data_object_index;
|
||||
|
||||
|
||||
// This tracks the balances in a dividend distribution account at the last time
|
||||
// This tracks the balances in a dividend distribution account at the last time
|
||||
// pending dividend payouts were calculated (last maintenance interval).
|
||||
// At each maintenance interval, we will compare the current balance to the
|
||||
// balance stored here to see how much was deposited during that interval.
|
||||
|
|
@ -434,9 +434,9 @@ namespace graphene { namespace chain {
|
|||
>
|
||||
> total_distributed_dividend_balance_object_multi_index_type;
|
||||
typedef generic_index<total_distributed_dividend_balance_object, total_distributed_dividend_balance_object_multi_index_type> total_distributed_dividend_balance_object_index;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup object
|
||||
*/
|
||||
|
|
@ -445,17 +445,17 @@ namespace graphene { namespace chain {
|
|||
public:
|
||||
static const uint8_t space_id = implementation_ids;
|
||||
static const uint8_t type_id = impl_lottery_balance_object_type;
|
||||
|
||||
|
||||
asset_id_type lottery_id;
|
||||
asset balance;
|
||||
|
||||
|
||||
asset get_balance()const { return balance; }
|
||||
void adjust_balance(const asset& delta);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
struct by_owner;
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup object_index
|
||||
*/
|
||||
|
|
@ -468,13 +468,13 @@ namespace graphene { namespace chain {
|
|||
>
|
||||
>
|
||||
> lottery_balance_index_type;
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup object_index
|
||||
*/
|
||||
typedef generic_index<lottery_balance_object, lottery_balance_index_type> lottery_balance_index;
|
||||
|
||||
|
||||
|
||||
|
||||
class sweeps_vesting_balance_object : public abstract_object<sweeps_vesting_balance_object>
|
||||
{
|
||||
public:
|
||||
|
|
@ -486,7 +486,7 @@ namespace graphene { namespace chain {
|
|||
uint64_t balance;
|
||||
asset_id_type asset_id;
|
||||
time_point_sec last_claim_date;
|
||||
|
||||
|
||||
uint64_t get_balance()const { return balance; }
|
||||
void adjust_balance(const asset& delta);
|
||||
asset available_for_claim() const { return asset( balance / SWEEPS_VESTING_BALANCE_MULTIPLIER , asset_id ); }
|
||||
|
|
@ -528,10 +528,10 @@ FC_REFLECT_DERIVED( graphene::chain::asset_bitasset_data_object, (graphene::db::
|
|||
(asset_cer_updated)
|
||||
(feed_cer_updated)
|
||||
)
|
||||
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::asset_dividend_data_object, (graphene::db::object),
|
||||
(options)
|
||||
(last_scheduled_payout_time)
|
||||
(last_scheduled_payout_time)
|
||||
(last_payout_time )
|
||||
(last_scheduled_distribution_time)
|
||||
(last_distribution_time)
|
||||
|
|
@ -561,3 +561,13 @@ FC_REFLECT_DERIVED( graphene::chain::lottery_balance_object, (graphene::db::obje
|
|||
|
||||
FC_REFLECT_DERIVED( graphene::chain::sweeps_vesting_balance_object, (graphene::db::object),
|
||||
(owner)(balance)(asset_id)(last_claim_date) )
|
||||
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_dynamic_data_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_bitasset_data_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_dividend_data_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::total_distributed_dividend_balance_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::lottery_balance_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::sweeps_vesting_balance_object )
|
||||
|
||||
|
|
|
|||
|
|
@ -73,3 +73,5 @@ namespace graphene { namespace chain {
|
|||
|
||||
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 )
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
#include <fstream>
|
||||
#include <graphene/chain/protocol/block.hpp>
|
||||
|
||||
#include <fc/filesystem.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
class index_entry;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
#include <graphene/db/object.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
@ -47,4 +48,7 @@ namespace graphene { namespace chain {
|
|||
|
||||
} }
|
||||
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::block_summary_object, (graphene::db::object), (block_id) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::block_summary_object )
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
#include <graphene/db/object.hpp>
|
||||
#include <graphene/db/generic_index.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
@ -54,8 +53,6 @@ struct budget_record
|
|||
share_type supply_delta = 0;
|
||||
};
|
||||
|
||||
class budget_record_object;
|
||||
|
||||
class budget_record_object : public graphene::db::abstract_object<budget_record_object>
|
||||
{
|
||||
public:
|
||||
|
|
@ -68,8 +65,7 @@ class budget_record_object : public graphene::db::abstract_object<budget_record_
|
|||
|
||||
} }
|
||||
|
||||
FC_REFLECT(
|
||||
graphene::chain::budget_record,
|
||||
FC_REFLECT(graphene::chain::budget_record,
|
||||
(time_since_last_budget)
|
||||
(from_initial_reserve)
|
||||
(from_accumulated_fees)
|
||||
|
|
@ -82,9 +78,8 @@ FC_REFLECT(
|
|||
(supply_delta)
|
||||
)
|
||||
|
||||
FC_REFLECT_DERIVED(
|
||||
graphene::chain::budget_record_object,
|
||||
(graphene::db::object),
|
||||
(time)
|
||||
(record)
|
||||
)
|
||||
FC_REFLECT_DERIVED(graphene::chain::budget_record_object,
|
||||
(graphene::db::object), (time)(record) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::budget_record )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::budget_record_object )
|
||||
|
|
|
|||
|
|
@ -65,3 +65,5 @@ typedef generic_index< buyback_object, buyback_multi_index_type > buyback_index;
|
|||
} } // graphene::chain
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::buyback_object, (graphene::db::object), (asset_to_buy) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::buyback_object )
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@
|
|||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
class chain_property_object;
|
||||
|
||||
/**
|
||||
* Contains invariants which are set at genesis and never changed.
|
||||
*/
|
||||
|
|
@ -48,3 +46,5 @@ FC_REFLECT_DERIVED( graphene::chain::chain_property_object, (graphene::db::objec
|
|||
(chain_id)
|
||||
(immutable_parameters)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::chain_property_object )
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
namespace graphene { namespace chain {
|
||||
using namespace graphene::db;
|
||||
|
||||
class account_object;
|
||||
|
||||
/**
|
||||
* @brief tracks information about a committee_member account.
|
||||
* @ingroup object
|
||||
|
|
@ -73,5 +71,8 @@ namespace graphene { namespace chain {
|
|||
using committee_member_index = generic_index<committee_member_object, committee_member_multi_index_type>;
|
||||
} } // graphene::chain
|
||||
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::committee_member_object, (graphene::db::object),
|
||||
(committee_member_account)(vote_id)(total_votes)(url) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::committee_member_object )
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#include <graphene/chain/protocol/authority.hpp>
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
|
||||
#include <graphene/db/object.hpp>
|
||||
#include <graphene/db/generic_index.hpp>
|
||||
|
||||
#include <fc/crypto/elliptic.hpp>
|
||||
|
|
@ -50,8 +49,6 @@ class blinded_balance_object : public graphene::db::abstract_object<blinded_bala
|
|||
authority owner;
|
||||
};
|
||||
|
||||
struct by_asset;
|
||||
struct by_owner;
|
||||
struct by_commitment;
|
||||
|
||||
/**
|
||||
|
|
@ -68,4 +65,8 @@ typedef generic_index<blinded_balance_object, blinded_balance_object_multi_index
|
|||
|
||||
} } // graphene::chain
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::blinded_balance_object, (graphene::db::object), (commitment)(asset_id)(owner) )
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::blinded_balance_object, (graphene::db::object),
|
||||
(commitment)(asset_id)(owner) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::blinded_balance_object )
|
||||
|
|
|
|||
|
|
@ -49,4 +49,7 @@ class fba_accumulator_object : public graphene::db::abstract_object< fba_accumul
|
|||
|
||||
} } // graphene::chain
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::fba_accumulator_object, (graphene::db::object), (accumulated_fba_fees)(designated_asset) )
|
||||
FC_REFLECT_DERIVED( graphene::chain::fba_accumulator_object, (graphene::db::object),
|
||||
(accumulated_fba_fees)(designated_asset) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::fba_accumulator_object )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#include <graphene/chain/protocol/address.hpp>
|
||||
#include <graphene/chain/protocol/chain_parameters.hpp>
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
#include <graphene/chain/immutable_chain_parameters.hpp>
|
||||
|
|
@ -169,56 +170,32 @@ struct genesis_state_type {
|
|||
|
||||
} } // namespace graphene::chain
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_account_type, (name)(owner_key)(active_key)(is_lifetime_member))
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_account_type)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_asset_type)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_balance_type)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_vesting_balance_type)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_witness_type)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_committee_member_type)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_worker_type)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type::initial_authority)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type::initial_cdd_vesting_policy)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type::initial_linear_vesting_policy)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type::initial_vesting_balance)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type::initial_bts_account_type)
|
||||
FC_REFLECT_TYPENAME(graphene::chain::genesis_state_type)
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_asset_type,
|
||||
(symbol)(issuer_name)(description)(precision)(max_supply)(accumulated_fees)(is_bitasset)(collateral_records))
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position,
|
||||
(owner)(collateral)(debt))
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_balance_type,
|
||||
(owner)(asset_symbol)(amount))
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_vesting_balance_type,
|
||||
(owner)(asset_symbol)(amount)(begin_timestamp)(vesting_cliff_seconds)(vesting_duration_seconds)(begin_balance))
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_witness_type, (owner_name)(block_signing_key))
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_committee_member_type, (owner_name))
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_worker_type, (owner_name)(daily_pay))
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_bts_account_type::initial_authority,
|
||||
(weight_threshold)
|
||||
(account_auths)
|
||||
(key_auths)
|
||||
(address_auths))
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_bts_account_type::initial_cdd_vesting_policy,
|
||||
(vesting_seconds)
|
||||
(coin_seconds_earned)
|
||||
(start_claim)
|
||||
(coin_seconds_earned_last_update))
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_bts_account_type::initial_linear_vesting_policy,
|
||||
(begin_timestamp)
|
||||
(vesting_cliff_seconds)
|
||||
(vesting_duration_seconds)
|
||||
(begin_balance))
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_bts_account_type::initial_vesting_balance,
|
||||
(asset_symbol)
|
||||
(amount)
|
||||
(policy_type)
|
||||
(policy))
|
||||
FC_REFLECT(graphene::chain::genesis_state_type::initial_bts_account_type,
|
||||
(name)
|
||||
(owner_authority)
|
||||
(active_authority)
|
||||
(core_balance)
|
||||
(vesting_balances))
|
||||
|
||||
FC_REFLECT(graphene::chain::genesis_state_type,
|
||||
(initial_timestamp)(max_core_supply)(initial_parameters)(initial_bts_accounts)(initial_accounts)(initial_assets)(initial_balances)
|
||||
(initial_vesting_balances)(initial_active_witnesses)(initial_witness_candidates)
|
||||
(initial_committee_candidates)(initial_worker_candidates)
|
||||
(initial_chain_id)
|
||||
(immutable_parameters))
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_account_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_asset_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_balance_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_vesting_balance_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_witness_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_committee_member_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_worker_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_bts_account_type::initial_authority)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_bts_account_type::initial_cdd_vesting_policy)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_bts_account_type::initial_linear_vesting_policy)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_bts_account_type::initial_vesting_balance)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type::initial_bts_account_type)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::genesis_state_type)
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ namespace graphene { namespace chain {
|
|||
}}
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::dynamic_global_property_object, (graphene::db::object),
|
||||
(random)
|
||||
(head_block_number)
|
||||
(head_block_id)
|
||||
(time)
|
||||
|
|
@ -149,3 +148,6 @@ FC_REFLECT_DERIVED( graphene::chain::global_property_object, (graphene::db::obje
|
|||
(active_committee_members)
|
||||
(active_witnesses)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::dynamic_global_property_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::global_property_object )
|
||||
|
|
|
|||
|
|
@ -23,11 +23,8 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#include <fc/reflect/reflect.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <graphene/chain/config.hpp>
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -47,3 +44,5 @@ FC_REFLECT( graphene::chain::immutable_chain_parameters,
|
|||
(num_special_accounts)
|
||||
(num_special_assets)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::immutable_chain_parameters )
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include <graphene/chain/protocol/transaction.hpp>
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
|
||||
namespace graphene { namespace app {
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
void operation_get_impacted_accounts(
|
||||
const graphene::chain::operation& op,
|
||||
|
|
@ -39,4 +39,4 @@ void transaction_get_impacted_accounts(
|
|||
fc::flat_set<graphene::chain::account_id_type>& result
|
||||
);
|
||||
|
||||
} } // graphene::app
|
||||
} } // graphene::app
|
||||
|
|
@ -217,3 +217,7 @@ FC_REFLECT_DERIVED( graphene::chain::force_settlement_object,
|
|||
(graphene::db::object),
|
||||
(owner)(balance)(settlement_date)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::limit_order_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::call_order_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::force_settlement_object )
|
||||
|
|
|
|||
|
|
@ -22,8 +22,10 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <graphene/chain/protocol/operations.hpp>
|
||||
#include <graphene/db/object.hpp>
|
||||
|
||||
#include <boost/multi_index/composite_key.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
@ -94,15 +96,22 @@ namespace graphene { namespace chain {
|
|||
operation_history_id_type operation_id;
|
||||
uint32_t sequence = 0; /// the operation position within the given account
|
||||
account_transaction_history_id_type next;
|
||||
|
||||
//std::pair<account_id_type,operation_history_id_type> account_op()const { return std::tie( account, operation_id ); }
|
||||
//std::pair<account_id_type,uint32_t> account_seq()const { return std::tie( account, sequence ); }
|
||||
};
|
||||
|
||||
struct by_id;
|
||||
struct by_seq;
|
||||
struct by_op;
|
||||
struct by_opid;
|
||||
|
||||
typedef multi_index_container<
|
||||
operation_history_object,
|
||||
indexed_by<
|
||||
ordered_unique< tag<by_id>, member< object, object_id_type, &object::id > >
|
||||
>
|
||||
> operation_history_multi_index_type;
|
||||
|
||||
typedef generic_index<operation_history_object, operation_history_multi_index_type> operation_history_index;
|
||||
|
||||
typedef multi_index_container<
|
||||
account_transaction_history_object,
|
||||
indexed_by<
|
||||
|
|
@ -132,6 +141,8 @@ typedef generic_index<account_transaction_history_object, account_transaction_hi
|
|||
|
||||
FC_REFLECT_DERIVED( graphene::chain::operation_history_object, (graphene::chain::object),
|
||||
(op)(result)(block_num)(trx_in_block)(op_in_trx)(virtual_op) )
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::account_transaction_history_object, (graphene::chain::object),
|
||||
(account)(operation_id)(sequence)(next) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::operation_history_object )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_transaction_history_object )
|
||||
|
|
|
|||
|
|
@ -27,9 +27,10 @@
|
|||
#include <graphene/chain/transaction_evaluation_state.hpp>
|
||||
|
||||
#include <graphene/db/generic_index.hpp>
|
||||
#include <boost/multi_index/composite_key.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
class database;
|
||||
|
||||
/**
|
||||
* @brief tracks the approval of a partially approved transaction
|
||||
|
|
@ -97,3 +98,5 @@ FC_REFLECT_DERIVED( graphene::chain::proposal_object, (graphene::chain::object),
|
|||
(expiration_time)(review_period_time)(proposed_transaction)(required_active_approvals)
|
||||
(available_active_approvals)(required_owner_approvals)(available_owner_approvals)
|
||||
(available_key_approvals)(proposer)(fail_reason))
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::proposal_object )
|
||||
|
|
|
|||
|
|
@ -317,5 +317,16 @@ FC_REFLECT( graphene::chain::account_whitelist_operation::fee_parameters_type, (
|
|||
FC_REFLECT( graphene::chain::account_update_operation::fee_parameters_type, (fee)(price_per_kbyte) )
|
||||
FC_REFLECT( graphene::chain::account_upgrade_operation::fee_parameters_type, (membership_annual_fee)(membership_lifetime_fee) )
|
||||
FC_REFLECT( graphene::chain::account_transfer_operation::fee_parameters_type, (fee) )
|
||||
|
||||
FC_REFLECT( graphene::chain::account_transfer_operation, (fee)(account_id)(new_owner)(extensions) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_options )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_whitelist_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_upgrade_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_transfer_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_whitelist_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_upgrade_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::account_transfer_operation )
|
||||
|
|
|
|||
|
|
@ -25,14 +25,10 @@
|
|||
|
||||
#include <graphene/chain/config.hpp>
|
||||
#include <graphene/chain/pts_address.hpp>
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
|
||||
#include <fc/array.hpp>
|
||||
#include <fc/crypto/ripemd160.hpp>
|
||||
|
||||
namespace fc { namespace ecc {
|
||||
class public_key;
|
||||
typedef fc::array<char,33> public_key_data;
|
||||
} } // fc::ecc
|
||||
#include <fc/reflect/typename.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -51,7 +47,7 @@ namespace graphene { namespace chain {
|
|||
class address
|
||||
{
|
||||
public:
|
||||
address(); ///< constructs empty / null address
|
||||
address(){} ///< constructs empty / null address
|
||||
explicit address( const std::string& base58str ); ///< converts to binary, validates checksum
|
||||
address( const fc::ecc::public_key& pub ); ///< converts to binary
|
||||
explicit address( const fc::ecc::public_key_data& pub ); ///< converts to binary
|
||||
|
|
@ -97,3 +93,5 @@ namespace std
|
|||
|
||||
#include <fc/reflect/reflect.hpp>
|
||||
FC_REFLECT( graphene::chain::address, (addr) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::address )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -112,3 +113,5 @@ FC_REFLECT( graphene::chain::block_id_predicate, (id) )
|
|||
FC_REFLECT_TYPENAME( graphene::chain::predicate )
|
||||
FC_REFLECT( graphene::chain::assert_operation, (fee)(fee_paying_account)(predicates)(required_auths)(extensions) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::assert_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::assert_operation )
|
||||
|
|
|
|||
|
|
@ -218,3 +218,7 @@ FC_REFLECT( graphene::chain::price, (base)(quote) )
|
|||
(core_exchange_rate)
|
||||
|
||||
FC_REFLECT( graphene::chain::price_feed, GRAPHENE_PRICE_FEED_FIELDS )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::price )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::price_feed )
|
||||
|
|
|
|||
|
|
@ -764,3 +764,30 @@ FC_REFLECT( graphene::chain::asset_reserve_operation,
|
|||
|
||||
FC_REFLECT( graphene::chain::asset_fund_fee_pool_operation, (fee)(from_account)(asset_id)(amount)(extensions) );
|
||||
FC_REFLECT( graphene::chain::asset_dividend_distribution_operation, (fee)(dividend_asset_id)(account_id)(amounts)(extensions) );
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_options )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::bitasset_options )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_global_settle_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_settle_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_fund_fee_pool_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_dividend_distribution_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_claim_fees_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_update_bitasset_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_update_feed_producers_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_publish_feed_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_issue_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_reserve_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_global_settle_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_settle_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_settle_cancel_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_fund_fee_pool_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_claim_fees_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_update_bitasset_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_update_feed_producers_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_publish_feed_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_issue_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::asset_reserve_operation )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
#include <graphene/chain/protocol/address.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -134,3 +135,5 @@ void add_authority_accounts(
|
|||
FC_REFLECT( graphene::chain::authority, (weight_threshold)(account_auths)(key_auths)(address_auths) )
|
||||
// FC_REFLECT_TYPENAME( graphene::chain::authority::classification )
|
||||
FC_REFLECT_ENUM( graphene::chain::authority::classification, (owner)(active)(key) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::authority )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
#include <graphene/chain/protocol/authority.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -57,3 +59,5 @@ namespace graphene { namespace chain {
|
|||
FC_REFLECT( graphene::chain::balance_claim_operation::fee_parameters_type, )
|
||||
FC_REFLECT( graphene::chain::balance_claim_operation,
|
||||
(fee)(deposit_to_account)(balance_to_claim)(balance_owner_key)(total_claimed) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::balance_claim_operation )
|
||||
|
|
|
|||
|
|
@ -27,8 +27,13 @@
|
|||
#include <graphene/chain/protocol/asset.hpp>
|
||||
#include <graphene/chain/protocol/authority.hpp>
|
||||
|
||||
#include <fc/thread/future.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
struct asset;
|
||||
struct authority;
|
||||
|
||||
/**
|
||||
* @defgroup operations Operations
|
||||
* @ingroup transactions Transactions
|
||||
|
|
|
|||
|
|
@ -69,3 +69,8 @@ FC_REFLECT( graphene::chain::block_header,
|
|||
(extensions) )
|
||||
FC_REFLECT_DERIVED( graphene::chain::signed_block_header, (graphene::chain::block_header), (witness_signature) )
|
||||
FC_REFLECT_DERIVED( graphene::chain::signed_block, (graphene::chain::signed_block_header), (transactions) )
|
||||
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(extern, graphene::chain::block_header)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(extern, graphene::chain::signed_block_header)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(extern, graphene::chain::signed_block)
|
||||
|
|
|
|||
|
|
@ -50,3 +50,5 @@ struct buyback_account_options
|
|||
} }
|
||||
|
||||
FC_REFLECT( graphene::chain::buyback_account_options, (asset_to_buy)(asset_to_buy_issuer)(markets) );
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::buyback_account_options )
|
||||
|
|
|
|||
|
|
@ -28,25 +28,25 @@
|
|||
#include <fc/smart_ref_fwd.hpp>
|
||||
|
||||
#include <../hardfork.d/GPOS.hf>
|
||||
#include <memory>
|
||||
|
||||
namespace graphene { namespace chain { struct fee_schedule; } }
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
struct parameter_extension
|
||||
{
|
||||
optional< bet_multiplier_type > min_bet_multiplier = GRAPHENE_DEFAULT_MIN_BET_MULTIPLIER;
|
||||
optional< bet_multiplier_type > max_bet_multiplier = GRAPHENE_DEFAULT_MAX_BET_MULTIPLIER;
|
||||
optional< uint16_t > betting_rake_fee_percentage = GRAPHENE_DEFAULT_RAKE_FEE_PERCENTAGE;
|
||||
optional< flat_map<bet_multiplier_type, bet_multiplier_type> >
|
||||
permitted_betting_odds_increments = flat_map<bet_multiplier_type, bet_multiplier_type>(GRAPHENE_DEFAULT_PERMITTED_BETTING_ODDS_INCREMENTS);
|
||||
optional< uint16_t > live_betting_delay_time = GRAPHENE_DEFAULT_LIVE_BETTING_DELAY_TIME;
|
||||
optional< bet_multiplier_type > min_bet_multiplier;
|
||||
optional< bet_multiplier_type > max_bet_multiplier;
|
||||
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;
|
||||
optional< uint16_t > sweeps_distribution_percentage = SWEEPS_DEFAULT_DISTRIBUTION_PERCENTAGE;
|
||||
optional< asset_id_type > sweeps_distribution_asset = SWEEPS_DEFAULT_DISTRIBUTION_ASSET;
|
||||
optional< account_id_type > sweeps_vesting_accumulator_account= SWEEPS_ACCUMULATOR_ACCOUNT;
|
||||
/* gpos parameters */
|
||||
optional < uint32_t > gpos_period = GPOS_PERIOD;
|
||||
optional < uint32_t > gpos_subperiod = GPOS_SUBPERIOD;
|
||||
optional < uint32_t > gpos_period_start;
|
||||
optional < uint32_t > gpos_period_start = HARDFORK_GPOS_TIME.sec_since_epoch();
|
||||
optional < uint32_t > gpos_vesting_lockin_period = GPOS_VESTING_LOCKIN_PERIOD;
|
||||
};
|
||||
|
||||
|
|
@ -203,3 +203,5 @@ FC_REFLECT( graphene::chain::chain_parameters,
|
|||
(maximum_tournament_number_of_wins)
|
||||
(extensions)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::chain_parameters )
|
||||
|
|
|
|||
|
|
@ -104,3 +104,10 @@ FC_REFLECT( graphene::chain::committee_member_create_operation,
|
|||
FC_REFLECT( graphene::chain::committee_member_update_operation,
|
||||
(fee)(committee_member)(committee_member_account)(new_url) )
|
||||
FC_REFLECT( graphene::chain::committee_member_update_global_parameters_operation, (fee)(new_parameters) );
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::committee_member_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::committee_member_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::committee_member_update_global_parameters_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::committee_member_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::committee_member_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::committee_member_update_global_parameters_operation )
|
||||
|
|
|
|||
|
|
@ -281,3 +281,10 @@ FC_REFLECT( graphene::chain::blind_transfer_operation,
|
|||
FC_REFLECT( graphene::chain::transfer_to_blind_operation::fee_parameters_type, (fee)(price_per_output) )
|
||||
FC_REFLECT( graphene::chain::transfer_from_blind_operation::fee_parameters_type, (fee) )
|
||||
FC_REFLECT( graphene::chain::blind_transfer_operation::fee_parameters_type, (fee)(price_per_output) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::transfer_to_blind_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::transfer_from_blind_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::blind_transfer_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::transfer_to_blind_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::transfer_from_blind_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::blind_transfer_operation )
|
||||
|
|
|
|||
|
|
@ -56,3 +56,6 @@ namespace graphene { namespace chain {
|
|||
|
||||
FC_REFLECT( graphene::chain::custom_operation::fee_parameters_type, (fee)(price_per_kbyte) )
|
||||
FC_REFLECT( graphene::chain::custom_operation, (fee)(payer)(required_auths)(id)(data) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::custom_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::custom_operation )
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <fc/io/varint.hpp>
|
||||
#include <fc/io/raw_fwd.hpp>
|
||||
#include <fc/reflect/reflect.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -45,3 +46,5 @@ struct fba_distribute_operation : public base_operation
|
|||
FC_REFLECT( graphene::chain::fba_distribute_operation::fee_parameters_type, )
|
||||
|
||||
FC_REFLECT( graphene::chain::fba_distribute_operation, (fee)(account_id)(fba_id)(amount) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::fba_distribute_operation )
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
#include <fc/smart_ref_fwd.hpp>
|
||||
#include <graphene/chain/protocol/operations.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
@ -85,3 +86,5 @@ namespace graphene { namespace chain {
|
|||
|
||||
FC_REFLECT_TYPENAME( graphene::chain::fee_parameters )
|
||||
FC_REFLECT( graphene::chain::fee_schedule, (parameters)(scale) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::fee_schedule )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -165,9 +166,15 @@ FC_REFLECT( graphene::chain::limit_order_cancel_operation::fee_parameters_type,
|
|||
FC_REFLECT( graphene::chain::call_order_update_operation::fee_parameters_type, (fee) )
|
||||
/// THIS IS THE ONLY VIRTUAL OPERATION THUS FAR...
|
||||
FC_REFLECT( graphene::chain::fill_order_operation::fee_parameters_type, )
|
||||
|
||||
|
||||
FC_REFLECT( graphene::chain::limit_order_create_operation,(fee)(seller)(amount_to_sell)(min_to_receive)(expiration)(fill_or_kill)(extensions))
|
||||
FC_REFLECT( graphene::chain::limit_order_cancel_operation,(fee)(fee_paying_account)(order)(extensions) )
|
||||
FC_REFLECT( graphene::chain::call_order_update_operation, (fee)(funding_account)(delta_collateral)(delta_debt)(extensions) )
|
||||
FC_REFLECT( graphene::chain::fill_order_operation, (fee)(order_id)(account_id)(pays)(receives) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::limit_order_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::limit_order_cancel_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::call_order_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::limit_order_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::limit_order_cancel_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::call_order_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::fill_order_operation )
|
||||
|
|
|
|||
|
|
@ -89,3 +89,6 @@ namespace graphene { namespace chain {
|
|||
|
||||
FC_REFLECT( graphene::chain::memo_message, (checksum)(text) )
|
||||
FC_REFLECT( graphene::chain::memo_data, (from)(to)(nonce)(message) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::memo_message )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::memo_data )
|
||||
|
|
|
|||
|
|
@ -167,3 +167,5 @@ namespace graphene { namespace chain {
|
|||
|
||||
FC_REFLECT_TYPENAME( graphene::chain::operation )
|
||||
FC_REFLECT( graphene::chain::op_wrapper, (op) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::op_wrapper )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
/**
|
||||
|
|
@ -179,3 +180,10 @@ FC_REFLECT( graphene::chain::proposal_update_operation, (fee)(fee_paying_account
|
|||
(active_approvals_to_add)(active_approvals_to_remove)(owner_approvals_to_add)(owner_approvals_to_remove)
|
||||
(key_approvals_to_add)(key_approvals_to_remove)(extensions) )
|
||||
FC_REFLECT( graphene::chain::proposal_delete_operation, (fee)(fee_paying_account)(using_owner_authority)(proposal)(extensions) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::proposal_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::proposal_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::proposal_delete_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::proposal_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::proposal_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::proposal_delete_operation )
|
||||
|
|
|
|||
|
|
@ -48,3 +48,5 @@ void validate_special_authority( const special_authority& auth );
|
|||
FC_REFLECT( graphene::chain::no_special_authority, )
|
||||
FC_REFLECT( graphene::chain::top_holders_special_authority, (asset)(num_top_holders) )
|
||||
FC_REFLECT_TYPENAME( graphene::chain::special_authority )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::top_holders_special_authority )
|
||||
|
|
|
|||
|
|
@ -230,3 +230,8 @@ FC_REFLECT( graphene::chain::transaction, (ref_block_num)(ref_block_prefix)(expi
|
|||
// Note: not reflecting signees field for backward compatibility; in addition, it should not be in p2p messages
|
||||
FC_REFLECT_DERIVED( graphene::chain::signed_transaction, (graphene::chain::transaction), (signatures) )
|
||||
FC_REFLECT_DERIVED( graphene::chain::processed_transaction, (graphene::chain::signed_transaction), (operation_results) )
|
||||
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(extern, graphene::chain::transaction)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(extern, graphene::chain::signed_transaction)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(extern, graphene::chain::processed_transaction)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/memo.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -105,3 +106,8 @@ FC_REFLECT( graphene::chain::override_transfer_operation::fee_parameters_type, (
|
|||
|
||||
FC_REFLECT( graphene::chain::override_transfer_operation, (fee)(issuer)(from)(to)(amount)(memo)(extensions) )
|
||||
FC_REFLECT( graphene::chain::transfer_operation, (fee)(from)(to)(amount)(memo)(extensions) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::transfer_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::override_transfer_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::transfer_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::override_transfer_operation )
|
||||
|
|
|
|||
|
|
@ -27,13 +27,15 @@
|
|||
#include <fc/io/enum_type.hpp>
|
||||
#include <fc/crypto/sha224.hpp>
|
||||
#include <fc/crypto/elliptic.hpp>
|
||||
#include <fc/crypto/ripemd160.hpp>
|
||||
#include <fc/reflect/reflect.hpp>
|
||||
#include <fc/reflect/variant.hpp>
|
||||
#include <fc/optional.hpp>
|
||||
#include <fc/safe.hpp>
|
||||
#include <fc/container/flat.hpp>
|
||||
#include <fc/string.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
#include <fc/io/datastream.hpp>
|
||||
#include <fc/io/raw_fwd.hpp>
|
||||
#include <fc/uint128.hpp>
|
||||
#include <fc/static_variant.hpp>
|
||||
#include <fc/smart_ref_fwd.hpp>
|
||||
|
|
@ -42,10 +44,34 @@
|
|||
#include <vector>
|
||||
#include <deque>
|
||||
#include <cstdint>
|
||||
#include <graphene/chain/protocol/address.hpp>
|
||||
#include <graphene/db/object_id.hpp>
|
||||
#include <graphene/chain/protocol/config.hpp>
|
||||
|
||||
#define GRAPHENE_EXTERNAL_SERIALIZATION(ext, type) \
|
||||
namespace fc { \
|
||||
ext template void from_variant( const variant& v, type& vo, uint32_t max_depth ); \
|
||||
ext template void to_variant( const type& v, variant& vo, uint32_t max_depth ); \
|
||||
namespace raw { \
|
||||
ext template void pack< datastream<size_t>, type >( datastream<size_t>& s, const type& tx, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); \
|
||||
ext template void pack< datastream<char*>, type >( datastream<char*>& s, const type& tx, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); \
|
||||
ext template void unpack< datastream<const char*>, type >( datastream<const char*>& s, type& tx, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); \
|
||||
} } // fc::raw
|
||||
|
||||
#define FC_REFLECT_DERIVED_NO_TYPENAME( TYPE, INHERITS, MEMBERS ) \
|
||||
namespace fc { \
|
||||
template<> struct reflector<TYPE> {\
|
||||
typedef TYPE type; \
|
||||
typedef fc::true_type is_defined; \
|
||||
typedef fc::false_type is_enum; \
|
||||
enum member_count_enum { \
|
||||
local_member_count = 0 BOOST_PP_SEQ_FOR_EACH( FC_REFLECT_MEMBER_COUNT, +, MEMBERS ),\
|
||||
total_member_count = local_member_count BOOST_PP_SEQ_FOR_EACH( FC_REFLECT_BASE_MEMBER_COUNT, +, INHERITS )\
|
||||
}; \
|
||||
FC_REFLECT_DERIVED_IMPL_INLINE( TYPE, INHERITS, MEMBERS ) \
|
||||
}; \
|
||||
} // fc
|
||||
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
using namespace graphene::db;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -126,10 +127,15 @@ FC_REFLECT( graphene::chain::vesting_balance_create_operation::fee_parameters_ty
|
|||
FC_REFLECT( graphene::chain::vesting_balance_withdraw_operation::fee_parameters_type, (fee) )
|
||||
|
||||
FC_REFLECT( graphene::chain::vesting_balance_create_operation, (fee)(creator)(owner)(amount)(policy)(balance_type) )
|
||||
FC_REFLECT( graphene::chain::vesting_balance_withdraw_operation, (fee)(vesting_balance)(owner)(amount) )
|
||||
FC_REFLECT( graphene::chain::vesting_balance_withdraw_operation, (fee)(vesting_balance)(owner)(amount))
|
||||
|
||||
FC_REFLECT(graphene::chain::linear_vesting_policy_initializer, (begin_timestamp)(vesting_cliff_seconds)(vesting_duration_seconds) )
|
||||
FC_REFLECT(graphene::chain::cdd_vesting_policy_initializer, (start_claim)(vesting_seconds) )
|
||||
FC_REFLECT_TYPENAME( graphene::chain::vesting_policy_initializer )
|
||||
|
||||
FC_REFLECT_ENUM( graphene::chain::vesting_balance_type, (normal)(gpos) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::vesting_balance_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::vesting_balance_withdraw_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::vesting_balance_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::vesting_balance_withdraw_operation )
|
||||
|
|
|
|||
|
|
@ -24,12 +24,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include <fc/container/flat.hpp>
|
||||
#include <fc/reflect/reflect.hpp>
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -150,3 +145,5 @@ FC_REFLECT_TYPENAME( fc::flat_set<graphene::chain::vote_id_type> )
|
|||
|
||||
FC_REFLECT_ENUM( graphene::chain::vote_id_type::vote_type, (witness)(committee)(worker)(VOTE_TYPE_COUNT) )
|
||||
FC_REFLECT( graphene::chain::vote_id_type, (content) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::vote_id_type )
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/memo.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -179,3 +180,12 @@ FC_REFLECT( graphene::chain::withdraw_permission_update_operation, (fee)(withdra
|
|||
FC_REFLECT( graphene::chain::withdraw_permission_claim_operation, (fee)(withdraw_permission)(withdraw_from_account)(withdraw_to_account)(amount_to_withdraw)(memo) );
|
||||
FC_REFLECT( graphene::chain::withdraw_permission_delete_operation, (fee)(withdraw_from_account)(authorized_account)
|
||||
(withdrawal_permission) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::withdraw_permission_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::withdraw_permission_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::withdraw_permission_claim_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::withdraw_permission_delete_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::withdraw_permission_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::withdraw_permission_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::withdraw_permission_claim_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::withdraw_permission_delete_operation )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -84,3 +85,8 @@ FC_REFLECT( graphene::chain::witness_create_operation, (fee)(witness_account)(ur
|
|||
|
||||
FC_REFLECT( graphene::chain::witness_update_operation::fee_parameters_type, (fee) )
|
||||
FC_REFLECT( graphene::chain::witness_update_operation, (fee)(witness)(witness_account)(new_url)(new_signing_key)(new_initial_secret) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::witness_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::witness_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::witness_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::witness_update_operation )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
#include <graphene/chain/protocol/base.hpp>
|
||||
#include <graphene/chain/protocol/asset.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -104,3 +105,5 @@ FC_REFLECT( graphene::chain::worker_create_operation::fee_parameters_type, (fee)
|
|||
FC_REFLECT( graphene::chain::worker_create_operation,
|
||||
(fee)(owner)(work_begin_date)(work_end_date)(daily_pay)(name)(url)(initializer) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::worker_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::worker_create_operation )
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <fc/array.hpp>
|
||||
#include <fc/io/datastream.hpp>
|
||||
#include <fc/io/raw_fwd.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace fc { namespace ecc { class public_key; } }
|
||||
|
|
@ -75,4 +77,11 @@ namespace fc
|
|||
{
|
||||
void to_variant( const graphene::chain::pts_address& var, fc::variant& vo, uint32_t max_depth = 1 );
|
||||
void from_variant( const fc::variant& var, graphene::chain::pts_address& vo, uint32_t max_depth = 1 );
|
||||
}
|
||||
namespace raw {
|
||||
extern template void pack( datastream<size_t>& s, const graphene::chain::pts_address& tx,
|
||||
uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
extern template void pack( datastream<char*>& s, const graphene::chain::pts_address& tx,
|
||||
uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
extern template void unpack( datastream<const char*>& s, graphene::chain::pts_address& tx,
|
||||
uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
} } // fc::raw
|
||||
|
|
|
|||
|
|
@ -68,3 +68,5 @@ FC_REFLECT_DERIVED(
|
|||
(graphene::db::object),
|
||||
(account)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::special_authority_object )
|
||||
|
|
|
|||
|
|
@ -22,12 +22,10 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
#include <graphene/chain/protocol/transaction.hpp>
|
||||
#include <graphene/db/index.hpp>
|
||||
#include <graphene/db/generic_index.hpp>
|
||||
#include <fc/uint128.hpp>
|
||||
|
||||
#include <boost/multi_index_container.hpp>
|
||||
#include <boost/multi_index/member.hpp>
|
||||
|
|
@ -72,3 +70,5 @@ namespace graphene { namespace chain {
|
|||
} }
|
||||
|
||||
FC_REFLECT_DERIVED( graphene::chain::transaction_object, (graphene::db::object), (trx)(trx_id) )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::transaction_object )
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@
|
|||
namespace graphene { namespace chain {
|
||||
using namespace graphene::db;
|
||||
|
||||
class vesting_balance_object;
|
||||
|
||||
struct vesting_policy_context
|
||||
{
|
||||
vesting_policy_context(
|
||||
|
|
@ -234,3 +232,7 @@ FC_REFLECT_DERIVED(graphene::chain::vesting_balance_object, (graphene::db::objec
|
|||
(policy)
|
||||
(balance_type)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::linear_vesting_policy )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::cdd_vesting_policy )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::vesting_balance_object )
|
||||
|
|
|
|||
|
|
@ -114,3 +114,5 @@ FC_REFLECT_DERIVED( graphene::chain::withdraw_permission_object, (graphene::db::
|
|||
(expiration)
|
||||
(claimed_this_period)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::withdraw_permission_object )
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
namespace graphene { namespace chain {
|
||||
using namespace graphene::db;
|
||||
|
||||
class witness_object;
|
||||
|
||||
class witness_object : public abstract_object<witness_object>
|
||||
{
|
||||
public:
|
||||
|
|
@ -85,3 +83,5 @@ FC_REFLECT_DERIVED( graphene::chain::witness_object, (graphene::db::object),
|
|||
(total_missed)
|
||||
(last_confirmed_block_num)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::witness_object )
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
class witness_schedule_object;
|
||||
|
||||
typedef hash_ctr_rng<
|
||||
/* HashClass = */ fc::sha256,
|
||||
/* SeedLength = */ GRAPHENE_RNG_SEED_LENGTH
|
||||
|
|
@ -96,3 +94,6 @@ FC_REFLECT_DERIVED(
|
|||
(recent_slots_filled)
|
||||
(current_shuffled_witnesses)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::witness_scheduler )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::witness_schedule_object )
|
||||
|
|
|
|||
|
|
@ -22,8 +22,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#pragma once
|
||||
#include <graphene/db/object.hpp>
|
||||
#include <graphene/chain/protocol/types.hpp>
|
||||
#include <graphene/db/generic_index.hpp>
|
||||
#include <graphene/chain/protocol/vote.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -175,3 +176,5 @@ FC_REFLECT_DERIVED( graphene::chain::worker_object, (graphene::db::object),
|
|||
(name)
|
||||
(url)
|
||||
)
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( extern, graphene::chain::worker_object )
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ bool proposal_object::is_authorized_to_execute(database& db) const
|
|||
[&]( account_id_type id ){ return &id(db).active; },
|
||||
[&]( account_id_type id ){ return &id(db).owner; },
|
||||
db.get_global_properties().parameters.max_authority_depth,
|
||||
true, /* allow committeee */
|
||||
true, /* allow committee */
|
||||
available_active_approvals,
|
||||
available_owner_approvals );
|
||||
}
|
||||
|
|
@ -90,3 +90,5 @@ void required_approval_index::object_removed( const object& obj )
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::proposal_object )
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@
|
|||
#include <graphene/chain/protocol/account.hpp>
|
||||
#include <graphene/chain/hardfork.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
/**
|
||||
|
|
@ -320,3 +323,15 @@ void account_transfer_operation::validate()const
|
|||
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_options )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_whitelist_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_upgrade_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_transfer_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_whitelist_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_upgrade_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::account_transfer_operation )
|
||||
|
|
|
|||
|
|
@ -27,9 +27,10 @@
|
|||
#include <fc/crypto/base58.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene {
|
||||
namespace chain {
|
||||
address::address(){}
|
||||
|
||||
address::address( const std::string& base58str )
|
||||
{
|
||||
|
|
@ -110,3 +111,5 @@ namespace fc
|
|||
vo = graphene::chain::address( var.as_string() );
|
||||
}
|
||||
}
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::address )
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <graphene/chain/protocol/protocol.hpp>
|
||||
#include <graphene/chain/protocol/account.hpp>
|
||||
#include <graphene/chain/protocol/asset_ops.hpp>
|
||||
#include <graphene/chain/protocol/assert.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -62,5 +66,7 @@ share_type assert_operation::calculate_fee(const fee_parameters_type& k)const
|
|||
return k.fee * predicates.size();
|
||||
}
|
||||
|
||||
|
||||
} } // namespace graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::assert_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::assert_operation )
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <graphene/chain/protocol/asset.hpp>
|
||||
#include <boost/rational.hpp>
|
||||
#include <boost/multiprecision/cpp_int.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
typedef boost::multiprecision::uint128_t uint128_t;
|
||||
|
|
@ -206,3 +207,7 @@ const int64_t scaled_precision_lut[19] =
|
|||
};
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::price )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::price_feed )
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
#include <graphene/chain/protocol/asset_ops.hpp>
|
||||
#include <graphene/chain/database.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
/**
|
||||
|
|
@ -288,3 +290,30 @@ void lottery_asset_options::validate() const
|
|||
}
|
||||
|
||||
} } // namespace graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_options )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::bitasset_options )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_global_settle_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_settle_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_fund_fee_pool_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_claim_fees_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_update_bitasset_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_update_feed_producers_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_publish_feed_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_issue_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_reserve_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_global_settle_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_settle_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_settle_cancel_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_fund_fee_pool_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_claim_fees_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_dividend_distribution_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_update_bitasset_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_update_feed_producers_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_publish_feed_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_issue_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::asset_reserve_operation )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include <graphene/chain/protocol/authority.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -36,3 +37,5 @@ void add_authority_accounts(
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::authority )
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <graphene/chain/protocol/block.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
#include <fc/bitutil.hpp>
|
||||
#include <algorithm>
|
||||
|
|
@ -90,3 +91,7 @@ namespace graphene { namespace chain {
|
|||
}
|
||||
|
||||
} }
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(/*not extern*/, graphene::chain::block_header)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(/*not extern*/, graphene::chain::signed_block_header)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(/*not extern*/, graphene::chain::signed_block)
|
||||
|
|
|
|||
|
|
@ -21,8 +21,12 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <graphene/chain/protocol/committee_member.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
void committee_member_create_operation::validate()const
|
||||
|
|
@ -45,3 +49,10 @@ void committee_member_update_global_parameters_operation::validate() const
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::committee_member_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::committee_member_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::committee_member_update_global_parameters_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::committee_member_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::committee_member_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::committee_member_update_global_parameters_operation )
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include <fc/crypto/base58.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
#include <fc/crypto/elliptic.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -141,9 +140,6 @@ share_type blind_transfer_operation::calculate_fee( const fee_parameters_type& k
|
|||
return k.fee + outputs.size() * k.price_per_output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Packs *this then encodes as base58 encoded string.
|
||||
*/
|
||||
|
|
@ -159,6 +155,11 @@ stealth_confirmation::stealth_confirmation( const std::string& base58 )
|
|||
*this = fc::raw::unpack<stealth_confirmation>( fc::from_base58( base58 ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::transfer_to_blind_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::transfer_from_blind_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::blind_transfer_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::transfer_to_blind_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::transfer_from_blind_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::blind_transfer_operation )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
*/
|
||||
#include <graphene/chain/protocol/custom.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
void custom_operation::validate()const
|
||||
|
|
@ -35,3 +37,6 @@ share_type custom_operation::calculate_fee(const fee_parameters_type& k)const
|
|||
}
|
||||
|
||||
} }
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::custom_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::custom_operation )
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ namespace fc
|
|||
//template const graphene::chain::fee_schedule& smart_ref<graphene::chain::fee_schedule>::operator*() const;
|
||||
}
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
#define MAX_FEE_STABILIZATION_ITERATION 4
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
|
@ -208,3 +210,5 @@ namespace graphene { namespace chain {
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::fee_schedule )
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <graphene/chain/protocol/market.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -46,3 +47,11 @@ void call_order_update_operation::validate()const
|
|||
} FC_CAPTURE_AND_RETHROW((*this)) }
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::limit_order_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::limit_order_cancel_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::call_order_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::limit_order_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::limit_order_cancel_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::call_order_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::fill_order_operation )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#include <graphene/chain/protocol/memo.hpp>
|
||||
#include <fc/crypto/aes.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -88,3 +89,6 @@ memo_message memo_message::deserialize(const string& serial)
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::memo_message )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::memo_data )
|
||||
|
|
|
|||
|
|
@ -21,7 +21,10 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <graphene/chain/protocol/operations.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -85,3 +88,5 @@ void operation_get_required_authorities( const operation& op,
|
|||
}
|
||||
|
||||
} } // namespace graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::op_wrapper )
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
proposal_create_operation proposal_create_operation::committee_proposal(const chain_parameters& global_params, fc::time_point_sec head_block_time )
|
||||
|
|
@ -105,3 +107,10 @@ void proposal_update_operation::get_required_owner_authorities( flat_set<account
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::proposal_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::proposal_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::proposal_delete_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::proposal_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::proposal_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::proposal_delete_operation )
|
||||
|
|
|
|||
44
libraries/chain/protocol/small_ops.cpp
Normal file
44
libraries/chain/protocol/small_ops.cpp
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) 2019 BitShares Blockchain Foundation, 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 <fc/smart_ref_impl.hpp>
|
||||
#include <graphene/chain/protocol/balance.hpp>
|
||||
#include <graphene/chain/protocol/buyback.hpp>
|
||||
#include <graphene/chain/protocol/fba.hpp>
|
||||
#include <graphene/chain/protocol/fee_schedule.hpp>
|
||||
#include <graphene/chain/protocol/vesting.hpp>
|
||||
#include <graphene/chain/protocol/chain_parameters.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::balance_claim_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::buyback_account_options )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::fba_distribute_operation )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::vesting_balance_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::vesting_balance_withdraw_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::vesting_balance_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::vesting_balance_withdraw_operation )
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::chain_parameters )
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <graphene/chain/protocol/tournament.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include <fc/bitutil.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
#include <algorithm>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -390,3 +391,7 @@ void signed_transaction::verify_authority(
|
|||
} FC_CAPTURE_AND_RETHROW( (*this) ) }
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(/*not extern*/, graphene::chain::transaction)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(/*not extern*/, graphene::chain::signed_transaction)
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION(/*not extern*/, graphene::chain::processed_transaction)
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
*/
|
||||
#include <graphene/chain/protocol/transfer.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
share_type transfer_operation::calculate_fee( const fee_parameters_type& schedule )const
|
||||
|
|
@ -61,3 +63,8 @@ void override_transfer_operation::validate()const
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::transfer_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::override_transfer_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::transfer_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::override_transfer_operation )
|
||||
|
|
|
|||
|
|
@ -49,3 +49,5 @@ void from_variant( const variant& var, graphene::chain::vote_id_type& vo, uint32
|
|||
}
|
||||
|
||||
} // fc
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::vote_id_type )
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
*/
|
||||
#include <graphene/chain/protocol/withdraw_permission.hpp>
|
||||
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
void withdraw_permission_update_operation::validate()const
|
||||
|
|
@ -65,6 +67,13 @@ void withdraw_permission_delete_operation::validate() const
|
|||
FC_ASSERT( withdraw_from_account != authorized_account );
|
||||
}
|
||||
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::withdraw_permission_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::withdraw_permission_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::withdraw_permission_claim_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::withdraw_permission_delete_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::withdraw_permission_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::withdraw_permission_update_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::withdraw_permission_claim_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::withdraw_permission_delete_operation )
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <graphene/chain/protocol/witness.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -39,3 +40,8 @@ void witness_update_operation::validate() const
|
|||
}
|
||||
|
||||
} } // graphene::chain
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::witness_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::witness_update_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::witness_create_operation )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::witness_update_operation )
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include <graphene/chain/protocol/worker.hpp>
|
||||
#include <fc/io/raw.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
|
|
@ -36,3 +37,6 @@ void worker_create_operation::validate() const
|
|||
}
|
||||
|
||||
} }
|
||||
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::worker_create_operation::fee_parameters_type )
|
||||
GRAPHENE_EXTERNAL_SERIALIZATION( /*not extern*/, graphene::chain::worker_create_operation )
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue