xrpld
Loading...
Searching...
No Matches
xrpl::peer_finder::SlotImp::RecentT Class Reference

#include <SlotImp.h>

Collaboration diagram for xrpl::peer_finder::SlotImp::RecentT:

Public Member Functions

 RecentT (clock_type &clock)
void insert (beast::ip::Endpoint const &ep, std::uint32_t hops)
 Called for each valid endpoint received for a slot.
bool filter (beast::ip::Endpoint const &ep, std::uint32_t hops)
 Returns true if we should not send endpoint to the slot.

Private Member Functions

void expire ()

Private Attributes

beast::aged_unordered_map< beast::ip::Endpoint, std::uint32_tcache_

Friends

class SlotImp

Detailed Description

Definition at line 132 of file SlotImp.h.

Constructor & Destructor Documentation

◆ RecentT()

xrpl::peer_finder::SlotImp::RecentT::RecentT ( clock_type & clock)
explicit

Definition at line 98 of file SlotImp.cpp.

Member Function Documentation

◆ insert()

void xrpl::peer_finder::SlotImp::RecentT::insert ( beast::ip::Endpoint const & ep,
std::uint32_t hops )

Called for each valid endpoint received for a slot.

We also insert messages that we send to the slot to prevent sending a slot the same address too frequently.

Definition at line 103 of file SlotImp.cpp.

◆ filter()

bool xrpl::peer_finder::SlotImp::RecentT::filter ( beast::ip::Endpoint const & ep,
std::uint32_t hops )

Returns true if we should not send endpoint to the slot.

Definition at line 118 of file SlotImp.cpp.

◆ expire()

void xrpl::peer_finder::SlotImp::RecentT::expire ( )
private

Definition at line 130 of file SlotImp.cpp.

◆ SlotImp

friend class SlotImp
friend

Definition at line 155 of file SlotImp.h.

Member Data Documentation

◆ cache_

beast::aged_unordered_map<beast::ip::Endpoint, std::uint32_t> xrpl::peer_finder::SlotImp::RecentT::cache_
private

Definition at line 156 of file SlotImp.h.