Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
NetinfoRequestHandler Class Reference

Process netinfo requests. More...

Inheritance diagram for NetinfoRequestHandler:
[legend]
Collaboration diagram for NetinfoRequestHandler:
[legend]

Classes

struct  Peer
 

Public Member Functions

UniValue PrepareRequest (const std::string &method, const std::vector< std::string > &args) override
 
UniValue ProcessReply (const UniValue &batch_in) override
 
- Public Member Functions inherited from BaseRequestHandler
virtual ~BaseRequestHandler ()=default
 
virtual UniValue PrepareRequest (const std::string &method, const std::vector< std::string > &args)=0
 
virtual UniValue ProcessReply (const UniValue &batch_in)=0
 

Public Attributes

const std::string m_help_doc
 

Static Public Attributes

static constexpr int ID_PEERINFO = 0
 
static constexpr int ID_NETWORKINFO = 1
 

Private Member Functions

int8_t NetworkStringToId (const std::string &str) const
 
bool DetailsRequested () const
 
bool IsAddressSelected () const
 
bool IsVersionSelected () const
 
std::string ChainToString () const
 
std::string PingTimeToString (double seconds) const
 
std::string ConnectionTypeForNetinfo (const std::string &conn_type) const
 
std::string FormatServices (const UniValue &services)
 

Private Attributes

std::array< std::array< uint16_t, NETWORKS.size()+1 >, 3 > m_counts {{{}}}
 Peer counts by (in/out/total, networks/total) More...
 
uint8_t m_block_relay_peers_count {0}
 
uint8_t m_manual_peers_count {0}
 
uint8_t m_details_level {0}
 Optional user-supplied arg to set dashboard details level. More...
 
bool m_outbound_only_selected {false}
 
bool m_is_asmap_on {false}
 
size_t m_max_addr_length {0}
 
size_t m_max_addr_processed_length {5}
 
size_t m_max_addr_rate_limited_length {6}
 
size_t m_max_age_length {5}
 
size_t m_max_id_length {2}
 
size_t m_max_services_length {6}
 
std::vector< Peerm_peers
 

Detailed Description

Process netinfo requests.

Definition at line 386 of file bitcoin-cli.cpp.

Member Function Documentation

◆ ChainToString()

std::string NetinfoRequestHandler::ChainToString ( ) const
inlineprivate

Definition at line 438 of file bitcoin-cli.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConnectionTypeForNetinfo()

std::string NetinfoRequestHandler::ConnectionTypeForNetinfo ( const std::string &  conn_type) const
inlineprivate

Definition at line 460 of file bitcoin-cli.cpp.

Here is the caller graph for this function:

◆ DetailsRequested()

bool NetinfoRequestHandler::DetailsRequested ( ) const
inlineprivate

Definition at line 400 of file bitcoin-cli.cpp.

Here is the caller graph for this function:

◆ FormatServices()

std::string NetinfoRequestHandler::FormatServices ( const UniValue services)
inlineprivate

Definition at line 468 of file bitcoin-cli.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsAddressSelected()

bool NetinfoRequestHandler::IsAddressSelected ( ) const
inlineprivate

Definition at line 401 of file bitcoin-cli.cpp.

Here is the caller graph for this function:

◆ IsVersionSelected()

bool NetinfoRequestHandler::IsVersionSelected ( ) const
inlineprivate

Definition at line 402 of file bitcoin-cli.cpp.

Here is the caller graph for this function:

◆ NetworkStringToId()

int8_t NetinfoRequestHandler::NetworkStringToId ( const std::string &  str) const
inlineprivate

Definition at line 392 of file bitcoin-cli.cpp.

Here is the caller graph for this function:

◆ PingTimeToString()

std::string NetinfoRequestHandler::PingTimeToString ( double  seconds) const
inlineprivate

Definition at line 454 of file bitcoin-cli.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrepareRequest()

UniValue NetinfoRequestHandler::PrepareRequest ( const std::string &  method,
const std::vector< std::string > &  args 
)
inlineoverridevirtual

Implements BaseRequestHandler.

Definition at line 482 of file bitcoin-cli.cpp.

Here is the call graph for this function:

◆ ProcessReply()

UniValue NetinfoRequestHandler::ProcessReply ( const UniValue batch_in)
inlineoverridevirtual

Implements BaseRequestHandler.

Definition at line 507 of file bitcoin-cli.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ ID_NETWORKINFO

constexpr int NetinfoRequestHandler::ID_NETWORKINFO = 1
staticconstexpr

Definition at line 480 of file bitcoin-cli.cpp.

◆ ID_PEERINFO

constexpr int NetinfoRequestHandler::ID_PEERINFO = 0
staticconstexpr

Definition at line 479 of file bitcoin-cli.cpp.

◆ m_block_relay_peers_count

uint8_t NetinfoRequestHandler::m_block_relay_peers_count {0}
private

Definition at line 390 of file bitcoin-cli.cpp.

◆ m_counts

std::array<std::array<uint16_t, NETWORKS.size() + 1>, 3> NetinfoRequestHandler::m_counts {{{}}}
private

Peer counts by (in/out/total, networks/total)

Definition at line 389 of file bitcoin-cli.cpp.

◆ m_details_level

uint8_t NetinfoRequestHandler::m_details_level {0}
private

Optional user-supplied arg to set dashboard details level.

Definition at line 399 of file bitcoin-cli.cpp.

◆ m_help_doc

const std::string NetinfoRequestHandler::m_help_doc

Definition at line 667 of file bitcoin-cli.cpp.

◆ m_is_asmap_on

bool NetinfoRequestHandler::m_is_asmap_on {false}
private

Definition at line 404 of file bitcoin-cli.cpp.

◆ m_manual_peers_count

uint8_t NetinfoRequestHandler::m_manual_peers_count {0}
private

Definition at line 391 of file bitcoin-cli.cpp.

◆ m_max_addr_length

size_t NetinfoRequestHandler::m_max_addr_length {0}
private

Definition at line 405 of file bitcoin-cli.cpp.

◆ m_max_addr_processed_length

size_t NetinfoRequestHandler::m_max_addr_processed_length {5}
private

Definition at line 406 of file bitcoin-cli.cpp.

◆ m_max_addr_rate_limited_length

size_t NetinfoRequestHandler::m_max_addr_rate_limited_length {6}
private

Definition at line 407 of file bitcoin-cli.cpp.

◆ m_max_age_length

size_t NetinfoRequestHandler::m_max_age_length {5}
private

Definition at line 408 of file bitcoin-cli.cpp.

◆ m_max_id_length

size_t NetinfoRequestHandler::m_max_id_length {2}
private

Definition at line 409 of file bitcoin-cli.cpp.

◆ m_max_services_length

size_t NetinfoRequestHandler::m_max_services_length {6}
private

Definition at line 410 of file bitcoin-cli.cpp.

◆ m_outbound_only_selected

bool NetinfoRequestHandler::m_outbound_only_selected {false}
private

Definition at line 403 of file bitcoin-cli.cpp.

◆ m_peers

std::vector<Peer> NetinfoRequestHandler::m_peers
private

Definition at line 437 of file bitcoin-cli.cpp.


The documentation for this class was generated from the following file: