BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
12 namespace graphene {
namespace app {
namespace detail {
43 void initialize(
const fc::path& data_dir, std::shared_ptr<boost::program_options::variables_map> options);
66 std::vector<graphene::net::message_hash_type>& contained_transaction_msg_ids)
override;
84 const std::vector<graphene::net::item_hash_t>& blockchain_synopsis,
85 uint32_t& remaining_item_count,
86 uint32_t limit)
override;
155 uint32_t number_of_blocks_after_reference_point)
override;
165 void sync_status(uint32_t item_type, uint32_t item_count)
override;
200 void initialize_plugins()
const;
201 void startup_plugins()
const;
202 void shutdown_plugins()
const;
207 void open_chain_database()
const;
214 std::shared_ptr<boost::program_options::variables_map> _options;
217 std::shared_ptr<graphene::chain::database> _chain_db;
218 std::shared_ptr<graphene::net::node> _p2p_network;
219 std::shared_ptr<fc::http::websocket_server> _websocket_server;
220 std::shared_ptr<fc::http::websocket_tls_server> _websocket_tls_server;
222 std::map<string, std::shared_ptr<abstract_plugin>> _active_plugins;
223 std::map<string, std::shared_ptr<abstract_plugin>> _available_plugins;
225 bool _is_finished_syncing =
false;
void handle_transaction(const graphene::net::trx_message &transaction_message) override
Called when a new transaction comes in from the network.
void error_encountered(const std::string &message, const fc::oexception &error) override
tracks the blockchain state in an extensible manner
void set_block_production(bool producing_blocks)
void new_connection(const fc::http::websocket_connection_ptr &c)
uint8_t get_current_block_interval_in_seconds() const override
graphene::net::item_hash_t get_head_block_id() const override
std::shared_ptr< websocket_connection > websocket_connection_ptr
void add_available_plugin(std::shared_ptr< abstract_plugin > p)
Add an available plugin.
void handle_message(const graphene::net::message &message_to_process) override
Called when a new message comes in from the network other than a block or a transaction....
virtual ~application_impl()
graphene::chain::chain_id_type get_chain_id() const override
application_impl(application &self)
bool has_item(const net::item_id &id) override
void set_api_access_info(const string &username, api_access_info &&permissions)
void enable_plugin(const string &name)
Enables a plugin.
void reset_websocket_server()
wraps boost::filesystem::path to provide platform independent path manipulation.
fc::optional< fc::temp_file > _lock_file
void reset_p2p_node(const fc::path &data_dir)
void sync_status(uint32_t item_type, uint32_t item_count) override
uint32_t estimate_last_known_fork_from_git_revision_timestamp(uint32_t unix_timestamp) const override
graphene::net::message get_item(const graphene::net::item_id &id) override
std::vector< graphene::net::item_hash_t > get_block_ids(const std::vector< graphene::net::item_hash_t > &blockchain_synopsis, uint32_t &remaining_item_count, uint32_t limit) override
fc::optional< api_access_info > get_api_access_info(const string &username) const
bool is_plugin_enabled(const string &name) const
Returns whether a plugin is enabled.
void initialize(const fc::path &data_dir, std::shared_ptr< boost::program_options::variables_map > options)
application_options _app_options
uint32_t get_block_number(const graphene::net::item_hash_t &block_id) override
fc::time_point_sec get_block_time(const graphene::net::item_hash_t &block_id) override
void connection_count_changed(uint32_t c) override
void reset_websocket_tls_server()
bool handle_block(const graphene::net::block_message &blk_msg, bool sync_mode, std::vector< graphene::net::message_hash_type > &contained_transaction_msg_ids) override
allows the application to validate an item prior to broadcasting to peers.
std::vector< graphene::net::item_hash_t > get_blockchain_synopsis(const graphene::net::item_hash_t &reference_point, uint32_t number_of_blocks_after_reference_point) override
bool is_included_block(const graphene::chain::block_id_type &block_id)
used by node reports status to client or fetch data from client