#include <node_impl.hxx>
Definition at line 260 of file node_impl.hxx.
◆ statistics_gathering_node_delegate_wrapper()
graphene::net::detail::statistics_gathering_node_delegate_wrapper::statistics_gathering_node_delegate_wrapper |
( |
std::shared_ptr< node_delegate > |
delegate, |
|
|
fc::thread * |
thread_for_delegate_calls |
|
) |
| |
◆ connection_count_changed()
void graphene::net::detail::statistics_gathering_node_delegate_wrapper::connection_count_changed |
( |
uint32_t |
c | ) |
|
|
overridevirtual |
◆ error_encountered()
void graphene::net::detail::statistics_gathering_node_delegate_wrapper::error_encountered |
( |
const std::string & |
message, |
|
|
const fc::oexception & |
error |
|
) |
| |
|
overridevirtual |
◆ estimate_last_known_fork_from_git_revision_timestamp()
uint32_t graphene::net::detail::statistics_gathering_node_delegate_wrapper::estimate_last_known_fork_from_git_revision_timestamp |
( |
uint32_t |
unix_timestamp | ) |
const |
|
overridevirtual |
◆ get_block_ids()
std::vector< item_hash_t > graphene::net::detail::statistics_gathering_node_delegate_wrapper::get_block_ids |
( |
const std::vector< item_hash_t > & |
blockchain_synopsis, |
|
|
uint32_t & |
remaining_item_count, |
|
|
uint32_t |
limit = 2000 |
|
) |
| |
|
overridevirtual |
Assuming all data elements are ordered in some way, this method should return up to limit ids that occur after from_id. On return, remaining_item_count will be set to the number of items in our blockchain after the last item returned in the result, or 0 if the result contains the last item in the blockchain
Implements graphene::net::node_delegate.
Definition at line 5353 of file node.cpp.
◆ get_block_number()
uint32_t graphene::net::detail::statistics_gathering_node_delegate_wrapper::get_block_number |
( |
const item_hash_t & |
block_id | ) |
|
|
overridevirtual |
◆ get_block_time()
Returns the time a block was produced (if block_id = 0, returns genesis time). If we don't know about the block, returns time_point_sec::min()
Implements graphene::net::node_delegate.
Definition at line 5392 of file node.cpp.
◆ get_blockchain_synopsis()
std::vector< item_hash_t > graphene::net::detail::statistics_gathering_node_delegate_wrapper::get_blockchain_synopsis |
( |
const item_hash_t & |
reference_point, |
|
|
uint32_t |
number_of_blocks_after_reference_point |
|
) |
| |
|
overridevirtual |
Returns a synopsis of the blockchain used for syncing. This consists of a list of selected item hashes from our current preferred blockchain, exponentially falling off into the past. Horrible explanation.
If the blockchain is empty, it will return the empty list. If the blockchain has one block, it will return a list containing just that block. If it contains more than one block: the first element in the list will be the hash of the highest numbered block that we cannot undo the second element will be the hash of an item at the half way point in the undoable segment of the blockchain the third will be ~3/4 of the way through the undoable segment of the block chain the fourth will be at ~7/8... &c. the last item in the list will be the hash of the most recent block on our preferred chain
Implements graphene::net::node_delegate.
Definition at line 5370 of file node.cpp.
◆ get_call_statistics()
fc::variant_object graphene::net::detail::statistics_gathering_node_delegate_wrapper::get_call_statistics |
( |
| ) |
|
◆ get_chain_id()
chain_id_type graphene::net::detail::statistics_gathering_node_delegate_wrapper::get_chain_id |
( |
| ) |
const |
|
overridevirtual |
◆ get_current_block_interval_in_seconds()
uint8_t graphene::net::detail::statistics_gathering_node_delegate_wrapper::get_current_block_interval_in_seconds |
( |
| ) |
const |
|
overridevirtual |
◆ get_head_block_id()
item_hash_t graphene::net::detail::statistics_gathering_node_delegate_wrapper::get_head_block_id |
( |
| ) |
const |
|
overridevirtual |
◆ get_item()
message graphene::net::detail::statistics_gathering_node_delegate_wrapper::get_item |
( |
const item_id & |
id | ) |
|
|
overridevirtual |
◆ handle_block()
Called when a new block comes in from the network.
- Parameters
-
blk_msg | the message which contains the block |
sync_mode | true if the message was fetched through the sync process, false during normal operation |
contained_transaction_msg_ids | container for the transactions to write back into |
- Returns
- true if this message caused the blockchain to switch forks, false if it did not
- Exceptions
-
exception | if error validating the item, otherwise the item is safe to broadcast on. |
Implements graphene::net::node_delegate.
Definition at line 5342 of file node.cpp.
◆ handle_message()
void graphene::net::detail::statistics_gathering_node_delegate_wrapper::handle_message |
( |
const message & |
message_to_process | ) |
|
|
overridevirtual |
Called when a new message comes in from the network other than a block or a transaction. Currently there are no other possible messages, so this should never be called.
- Exceptions
-
exception | if error validating the item, otherwise the item is safe to broadcast on. |
Implements graphene::net::node_delegate.
Definition at line 5337 of file node.cpp.
◆ handle_transaction()
void graphene::net::detail::statistics_gathering_node_delegate_wrapper::handle_transaction |
( |
const graphene::net::trx_message & |
trx_msg | ) |
|
|
overridevirtual |
Called when a new transaction comes in from the network.
- Exceptions
-
exception | if error validating the item, otherwise the item is safe to broadcast on. |
Implements graphene::net::node_delegate.
Definition at line 5348 of file node.cpp.
◆ has_item()
bool graphene::net::detail::statistics_gathering_node_delegate_wrapper::has_item |
( |
const graphene::net::item_id & |
id | ) |
|
|
overridevirtual |
◆ sync_status()
void graphene::net::detail::statistics_gathering_node_delegate_wrapper::sync_status |
( |
uint32_t |
item_type, |
|
|
uint32_t |
item_count |
|
) |
| |
|
overridevirtual |
Call this after the call to handle_message succeeds.
- Parameters
-
item_type | the type of the item we're synchronizing, will be the same as item passed to the sync_from() call |
item_count | the number of items known to the node that haven't been sent to handle_item() yet. After item_count more calls to handle_item(), the node will be in sync |
Implements graphene::net::node_delegate.
Definition at line 5375 of file node.cpp.
The documentation for this class was generated from the following files: