BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
provides application independent P2P broadcast and data synchronization More...
#include <node.hpp>
Public Member Functions | |
node (const std::string &user_agent) | |
virtual | ~node () |
void | close () const |
void | set_node_delegate (std::shared_ptr< node_delegate > del) const |
void | load_configuration (const fc::path &configuration_directory) const |
virtual void | listen_to_p2p_network () const |
virtual void | connect_to_p2p_network () const |
void | add_node (const fc::ip::endpoint &ep) const |
void | add_seed_nodes (const std::vector< std::string > &seeds) const |
void | add_seed_node (const std::string &in) const |
virtual void | connect_to_endpoint (const fc::ip::endpoint &ep) const |
void | set_listen_endpoint (const fc::ip::endpoint &ep, bool wait_if_not_available) const |
void | set_inbound_endpoint (const fc::ip::endpoint &ep) const |
void | set_accept_incoming_connections (bool accept) const |
void | set_connect_to_new_peers (bool connect) const |
virtual fc::ip::endpoint | get_actual_listening_endpoint () const |
void | set_advertise_algorithm (const std::string &algo, const std::vector< std::string > &advertise_or_exclude_list=std::vector< std::string >()) const |
std::vector< peer_status > | get_connected_peers () const |
virtual uint32_t | get_connection_count () const |
virtual void | broadcast (const message &item_to_broadcast) const |
virtual void | broadcast_transaction (const signed_transaction &trx) const |
virtual void | sync_from (const item_id ¤t_head_block, const std::vector< uint32_t > &hard_fork_block_numbers) const |
bool | is_connected () const |
void | set_advanced_node_parameters (const fc::variant_object ¶ms) const |
fc::variant_object | get_advanced_node_parameters () const |
message_propagation_data | get_tx_propagation_data (const graphene::protocol::transaction_id_type &transaction_id) const |
message_propagation_data | get_block_propagation_data (const graphene::protocol::block_id_type &block_id) const |
node_id_t | get_node_id () const |
void | set_allowed_peers (const std::vector< node_id_t > &allowed_peers) const |
void | clear_peer_database () const |
void | set_total_bandwidth_limit (uint32_t upload_bytes_per_second, uint32_t download_bytes_per_second) const |
fc::variant_object | network_get_info () const |
fc::variant_object | network_get_usage_stats () const |
std::vector< potential_peer_record > | get_potential_peers () const |
fc::variant_object | get_call_statistics () const |
Protected Attributes | |
node_impl_ptr | my |
provides application independent P2P broadcast and data synchronization
Unanswered questions: when does the node start establishing network connections and accepting peers? we don't have enough info to start synchronizing until sync_from() is called, would we have any reason to connect before that?
|
explicit |
void graphene::net::node::add_node | ( | const fc::ip::endpoint & | ep | ) | const |
void graphene::net::node::add_seed_node | ( | const std::string & | in | ) | const |
void graphene::net::node::add_seed_nodes | ( | const std::vector< std::string > & | seeds | ) | const |
|
virtual |
|
inlinevirtual |
void graphene::net::node::clear_peer_database | ( | ) | const |
|
virtual |
|
virtual |
|
virtual |
fc::variant_object graphene::net::node::get_advanced_node_parameters | ( | ) | const |
message_propagation_data graphene::net::node::get_block_propagation_data | ( | const graphene::protocol::block_id_type & | block_id | ) | const |
fc::variant_object graphene::net::node::get_call_statistics | ( | ) | const |
std::vector< peer_status > graphene::net::node::get_connected_peers | ( | ) | const |
|
virtual |
std::vector< potential_peer_record > graphene::net::node::get_potential_peers | ( | ) | const |
message_propagation_data graphene::net::node::get_tx_propagation_data | ( | const graphene::protocol::transaction_id_type & | transaction_id | ) | const |
|
virtual |
void graphene::net::node::load_configuration | ( | const fc::path & | configuration_directory | ) | const |
fc::variant_object graphene::net::node::network_get_info | ( | ) | const |
fc::variant_object graphene::net::node::network_get_usage_stats | ( | ) | const |
void graphene::net::node::set_accept_incoming_connections | ( | bool | accept | ) | const |
void graphene::net::node::set_advanced_node_parameters | ( | const fc::variant_object & | params | ) | const |
void graphene::net::node::set_advertise_algorithm | ( | const std::string & | algo, |
const std::vector< std::string > & | advertise_or_exclude_list = std::vector<std::string>() |
||
) | const |
void graphene::net::node::set_allowed_peers | ( | const std::vector< node_id_t > & | allowed_peers | ) | const |
void graphene::net::node::set_connect_to_new_peers | ( | bool | connect | ) | const |
void graphene::net::node::set_inbound_endpoint | ( | const fc::ip::endpoint & | ep | ) | const |
void graphene::net::node::set_listen_endpoint | ( | const fc::ip::endpoint & | ep, |
bool | wait_if_not_available | ||
) | const |
Specifies the IP address and port on the "local machine" that should accept incoming connections.
ep | the endpoint (IP address and port) |
wait_if_not_available | keep retrying if port is not available |
void graphene::net::node::set_node_delegate | ( | std::shared_ptr< node_delegate > | del | ) | const |
void graphene::net::node::set_total_bandwidth_limit | ( | uint32_t | upload_bytes_per_second, |
uint32_t | download_bytes_per_second | ||
) | const |
|
virtual |
|
protected |