Added getter for core dynamic data object
This commit is contained in:
parent
dcc6902720
commit
1939cd127b
4 changed files with 9 additions and 0 deletions
|
|
@ -40,6 +40,11 @@ const asset_object& database::get_core_asset() const
|
||||||
return *_p_core_asset_obj;
|
return *_p_core_asset_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const asset_dynamic_data_object& database::get_core_dynamic_data() const
|
||||||
|
{
|
||||||
|
return *_p_core_dynamic_data_obj;
|
||||||
|
}
|
||||||
|
|
||||||
const global_property_object& database::get_global_properties()const
|
const global_property_object& database::get_global_properties()const
|
||||||
{
|
{
|
||||||
return *_p_global_prop_obj;
|
return *_p_global_prop_obj;
|
||||||
|
|
|
||||||
|
|
@ -496,6 +496,7 @@ void database::init_genesis(const genesis_state_type& genesis_state)
|
||||||
FC_ASSERT( asset_id_type(core_asset.id) == asset().asset_id );
|
FC_ASSERT( asset_id_type(core_asset.id) == asset().asset_id );
|
||||||
FC_ASSERT( get_balance(account_id_type(), asset_id_type()) == asset(dyn_asset.current_supply) );
|
FC_ASSERT( get_balance(account_id_type(), asset_id_type()) == asset(dyn_asset.current_supply) );
|
||||||
_p_core_asset_obj = &core_asset;
|
_p_core_asset_obj = &core_asset;
|
||||||
|
_p_core_dynamic_data_obj = &dyn_asset;
|
||||||
|
|
||||||
#ifdef _DEFAULT_DIVIDEND_ASSET
|
#ifdef _DEFAULT_DIVIDEND_ASSET
|
||||||
// Create default dividend asset
|
// Create default dividend asset
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,7 @@ void database::open(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_p_core_asset_obj = &get( asset_id_type() );
|
_p_core_asset_obj = &get( asset_id_type() );
|
||||||
|
_p_core_dynamic_data_obj = &get( asset_dynamic_data_id_type() );
|
||||||
_p_global_prop_obj = &get( global_property_id_type() );
|
_p_global_prop_obj = &get( global_property_id_type() );
|
||||||
_p_chain_property_obj = &get( chain_property_id_type() );
|
_p_chain_property_obj = &get( chain_property_id_type() );
|
||||||
_p_dyn_global_prop_obj = &get( dynamic_global_property_id_type() );
|
_p_dyn_global_prop_obj = &get( dynamic_global_property_id_type() );
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,7 @@ namespace graphene { namespace chain {
|
||||||
|
|
||||||
const chain_id_type& get_chain_id()const;
|
const chain_id_type& get_chain_id()const;
|
||||||
const asset_object& get_core_asset()const;
|
const asset_object& get_core_asset()const;
|
||||||
|
const asset_dynamic_data_object& get_core_dynamic_data()const;
|
||||||
const chain_property_object& get_chain_properties()const;
|
const chain_property_object& get_chain_properties()const;
|
||||||
const global_property_object& get_global_properties()const;
|
const global_property_object& get_global_properties()const;
|
||||||
const dynamic_global_property_object& get_dynamic_global_properties()const;
|
const dynamic_global_property_object& get_dynamic_global_properties()const;
|
||||||
|
|
@ -593,6 +594,7 @@ namespace graphene { namespace chain {
|
||||||
/// Pointers to core asset object and global objects who will have immutable addresses after created
|
/// Pointers to core asset object and global objects who will have immutable addresses after created
|
||||||
///@{
|
///@{
|
||||||
const asset_object* _p_core_asset_obj = nullptr;
|
const asset_object* _p_core_asset_obj = nullptr;
|
||||||
|
const asset_dynamic_data_object* _p_core_dynamic_data_obj = nullptr;
|
||||||
const global_property_object* _p_global_prop_obj = nullptr;
|
const global_property_object* _p_global_prop_obj = nullptr;
|
||||||
const dynamic_global_property_object* _p_dyn_global_prop_obj = nullptr;
|
const dynamic_global_property_object* _p_dyn_global_prop_obj = nullptr;
|
||||||
const chain_property_object* _p_chain_property_obj = nullptr;
|
const chain_property_object* _p_chain_property_obj = nullptr;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue