#include <addrdb.h>
#include <addrman.h>
#include <amount.h>
#include <bloom.h>
#include <compat.h>
#include <crypto/siphash.h>
#include <hash.h>
#include <limitedmap.h>
#include <netaddress.h>
#include <policy/feerate.h>
#include <protocol.h>
#include <random.h>
#include <streams.h>
#include <sync.h>
#include <uint256.h>
#include <threadinterrupt.h>
#include <atomic>
#include <deque>
#include <stdint.h>
#include <thread>
#include <memory>
#include <condition_variable>
#include <arpa/inet.h>
Go to the source code of this file.
◆ mapMsgCmdSize
◆ NodeId
◆ anonymous enum
Enumerator |
---|
LOCAL_NONE | |
LOCAL_IF | |
LOCAL_BIND | |
LOCAL_UPNP | |
LOCAL_MANUAL | |
LOCAL_MAX | |
◆ AddLocal() [1/2]
◆ AddLocal() [2/2]
◆ AdvertiseLocal()
void AdvertiseLocal |
( |
CNode * |
pnode | ) |
|
◆ BindListenPort()
bool BindListenPort |
( |
const CService & |
bindAddr, |
|
|
std::string & |
strError, |
|
|
bool |
fWhitelisted = false |
|
) |
| |
◆ Discover()
◆ GetListenPort()
unsigned short GetListenPort |
( |
| ) |
|
◆ GetLocal()
◆ GetLocalAddress()
◆ GUARDED_BY()
◆ InterruptMapPort()
void InterruptMapPort |
( |
| ) |
|
◆ IsLocal()
check whether a given address is potentially local
◆ IsPeerAddrLocalGood()
bool IsPeerAddrLocalGood |
( |
CNode * |
pnode | ) |
|
◆ IsReachable() [1/2]
bool IsReachable |
( |
enum Network |
net | ) |
|
- Returns
- true if the network is reachable, false otherwise
◆ IsReachable() [2/2]
bool IsReachable |
( |
const CNetAddr & |
addr | ) |
|
- Returns
- true if the address is in a reachable network, false otherwise
◆ PoissonNextSend()
Return a timestamp in the future (in microseconds) for exponentially distributed events.
◆ RemoveLocal()
void RemoveLocal |
( |
const CService & |
addr | ) |
|
◆ SeenLocal()
◆ SetReachable()
void SetReachable |
( |
enum Network |
net, |
|
|
bool |
reachable |
|
) |
| |
Mark a network as reachable or unreachable (no automatic connects to it)
- Note
- Networks are reachable by default
◆ StartMapPort()
◆ StopMapPort()
◆ cs_mapLocalHost
◆ DEFAULT_BLOCKSONLY
const bool DEFAULT_BLOCKSONLY = false |
|
static |
◆ DEFAULT_FORCEDNSSEED
const bool DEFAULT_FORCEDNSSEED = false |
|
static |
◆ DEFAULT_LISTEN
const bool DEFAULT_LISTEN = true |
|
static |
◆ DEFAULT_MAX_PEER_CONNECTIONS
const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125 |
|
static |
The maximum number of peer connections to maintain.
◆ DEFAULT_MAX_UPLOAD_TARGET
const uint64_t DEFAULT_MAX_UPLOAD_TARGET = 0 |
|
static |
The default for -maxuploadtarget. 0 = Unlimited
◆ DEFAULT_MAXRECEIVEBUFFER
const size_t DEFAULT_MAXRECEIVEBUFFER = 5 * 1000 |
|
static |
◆ DEFAULT_MAXSENDBUFFER
const size_t DEFAULT_MAXSENDBUFFER = 1 * 1000 |
|
static |
◆ DEFAULT_PEER_CONNECT_TIMEOUT
const int64_t DEFAULT_PEER_CONNECT_TIMEOUT = 60 |
|
static |
◆ DEFAULT_UPNP
const bool DEFAULT_UPNP = false |
|
static |
◆ fDiscover
◆ FEELER_INTERVAL
const int FEELER_INTERVAL = 120 |
|
static |
Run the feeler connection loop once every 2 minutes or 120 seconds.
◆ fListen
◆ g_banman
std::unique_ptr<BanMan> g_banman |
◆ g_connman
◆ g_relay_txes
◆ MAX_ADDNODE_CONNECTIONS
const int MAX_ADDNODE_CONNECTIONS = 8 |
|
static |
Maximum number of addnode outgoing nodes
◆ MAX_ADDR_TO_SEND
const unsigned int MAX_ADDR_TO_SEND = 1000 |
|
static |
The maximum number of new addresses to accumulate before announcing.
◆ MAX_INV_SZ
const unsigned int MAX_INV_SZ = 50000 |
|
static |
The maximum number of entries in an 'inv' protocol message
◆ MAX_LOCATOR_SZ
const unsigned int MAX_LOCATOR_SZ = 101 |
|
static |
The maximum number of entries in a locator
◆ MAX_OUTBOUND_CONNECTIONS
const int MAX_OUTBOUND_CONNECTIONS = 8 |
|
static |
Maximum number of automatic outgoing nodes
◆ MAX_PROTOCOL_MESSAGE_LENGTH
const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 4 * 1000 * 1000 |
|
static |
Maximum length of incoming protocol messages (no message over 4 MB is currently acceptable).
◆ MAX_SUBVERSION_LENGTH
const unsigned int MAX_SUBVERSION_LENGTH = 256 |
|
static |
Maximum length of the user agent string in version
message
◆ MAX_UPLOAD_TIMEFRAME
const uint64_t MAX_UPLOAD_TIMEFRAME = 60 * 60 * 24 |
|
static |
The default timeframe for -maxuploadtarget. 1 day.
◆ NET_MESSAGE_COMMAND_OTHER
const std::string NET_MESSAGE_COMMAND_OTHER |
◆ PING_INTERVAL
const int PING_INTERVAL = 2 * 60 |
|
static |
Time between pings automatically sent out for latency probing and keepalive (in seconds).
◆ strSubVersion
std::string strSubVersion |
Subversion as sent to the P2P network in version
messages
◆ TIMEOUT_INTERVAL
const int TIMEOUT_INTERVAL = 20 * 60 |
|
static |
Time after which to disconnect, after waiting for a ping response (or inactivity).