TARAXA
|
#include <NodeTable.h>
Public Attributes | |
unsigned | version = 0 |
unsigned | chain_id = 0 |
NodeIPEndpoint | source |
NodeIPEndpoint | destination |
std::optional< uint64_t > | seq |
![]() | |
NodeID | sourceid |
h256 | echo |
boost::optional< uint32_t > | expiration |
![]() | |
bytes | data |
Static Public Attributes | |
static constexpr uint8_t | type = 1 |
![]() | |
static constexpr std::chrono::seconds | c_timeToLiveS {60} |
Additional Inherited Members | |
![]() | |
static std::unique_ptr< DiscoveryDatagram > | interpretUDP (bi::udp::endpoint const &_from, bytesConstRef _packet) |
Decodes UDP packets. | |
![]() | |
static uint32_t | futureFromEpoch (std::chrono::seconds _sec) |
static uint32_t | secondsSinceEpoch () |
static Public | authenticate (bytesConstRef _sig, bytesConstRef _rlp) |
![]() | |
bi::udp::endpoint | locus |
Ping packet: Sent to check if node is alive. PingNode is cached and regenerated after timestamp + t, where t is timeout.
Ping is used to implement evict. When a new node is seen for a given bucket which is full, the least-responsive node is pinged. If the pinged node doesn't respond, then it is removed and the new node is inserted.
|
inline |
|
inline |
|
inline |
Constructor used for parsing inbound packets.
|
inline |
Constructor used for sending.
|
inlineoverridevirtual |
Implements dev::p2p::RLPXDatagramFace.
|
inlineoverridevirtual |
Implements dev::p2p::RLPXDatagramFace.
Implements dev::p2p::RLPXDatagramFace.
|
inlineoverridevirtual |
Implements dev::p2p::RLPXDatagramFace.
unsigned dev::p2p::PingNode::chain_id = 0 |
NodeIPEndpoint dev::p2p::PingNode::destination |
std::optional<uint64_t> dev::p2p::PingNode::seq |
NodeIPEndpoint dev::p2p::PingNode::source |
unsigned dev::p2p::PingNode::version = 0 |