78 std::vector<message_hash_type>& contained_transaction_msg_ids ) = 0;
96 virtual void handle_message(
const message& message_to_process ) = 0;
105 virtual std::vector<item_hash_t> get_block_ids(
const std::vector<item_hash_t>& blockchain_synopsis,
106 uint32_t& remaining_item_count,
107 uint32_t limit = 2000) = 0;
133 virtual std::vector<item_hash_t> get_blockchain_synopsis(
const item_hash_t& reference_point,
134 uint32_t number_of_blocks_after_reference_point) = 0;
144 virtual void sync_status( uint32_t item_type, uint32_t item_count ) = 0;
149 virtual void connection_count_changed( uint32_t c ) = 0;
151 virtual uint32_t get_block_number(
const item_hash_t& block_id) = 0;
161 virtual uint32_t estimate_last_known_fork_from_git_revision_timestamp(uint32_t unix_timestamp)
const = 0;
164 virtual uint8_t get_current_block_interval_in_seconds()
const = 0;
190 class node :
public std::enable_shared_from_this<node>
193 explicit node(
const std::string& user_agent);
198 void set_node_delegate( std::shared_ptr<node_delegate> del )
const;
200 void load_configuration(
const fc::path& configuration_directory )
const;
202 virtual void listen_to_p2p_network()
const;
203 virtual void connect_to_p2p_network()
const;
216 void add_seed_nodes(
const std::vector<std::string>& seeds )
const;
222 void add_seed_node(
const std::string& in)
const;
235 void set_listen_endpoint(
const fc::ip::endpoint& ep,
bool wait_if_not_available )
const;
248 void set_accept_incoming_connections(
bool accept )
const;
254 void set_connect_to_new_peers(
bool connect )
const;
269 void set_advertise_algorithm(
const std::string& algo,
270 const std::vector<std::string>& advertise_or_exclude_list = std::vector<std::string>() )
const;
275 std::vector<peer_status> get_connected_peers()
const;
278 virtual uint32_t get_connection_count()
const;
284 virtual void broadcast(
const message& item_to_broadcast )
const;
294 virtual void sync_from(
const item_id& current_head_block,
295 const std::vector<uint32_t>& hard_fork_block_numbers )
const;
297 bool is_connected()
const;
306 void set_allowed_peers(
const std::vector<node_id_t>& allowed_peers)
const;
312 void clear_peer_database()
const;
314 void set_total_bandwidth_limit(uint32_t upload_bytes_per_second, uint32_t download_bytes_per_second)
const;
319 std::vector<potential_peer_record> get_potential_peers()
const;
std::shared_ptr< detail::node_impl > node_impl_ptr
An order-perserving dictionary of variant's.
virtual void broadcast_transaction(const signed_transaction &trx) const
used by node reports status to client or fetch data from client
FC_REFLECT(graphene::net::message_propagation_data,(received_time)(validated_time)(originating_peer))
fc::time_point received_time
std::shared_ptr< node > node_ptr
void connect(AsyncSocket &sock, const EndpointType &ep)
wraps boost::asio::socket::async_connect
void accept(AcceptorType &acc, SocketType &sock)
wraps boost::asio::async_accept
provides stack-based nullable value similar to boost::optional
provides application independent P2P broadcast and data synchronization
adds a signature to a transaction
node_id_t originating_peer
fc::time_point validated_time
wraps boost::filesystem::path to provide platform independent path manipulation.