34 #include <condition_variable>
37 #include <arpa/inet.h>
114 std::vector<unsigned char>
data;
255 CConnman(uint64_t seed0, uint64_t seed1,
bool network_active =
true);
282 for (
auto&& node : vNodes) {
291 for (
auto&& node : vNodes) {
297 template<
typename Callable,
typename CallableAfter>
301 for (
auto&& node : vNodes) {
308 template<
typename Callable,
typename CallableAfter>
312 for (
auto&& node : vNodes) {
323 std::vector<CAddress>
GetAddresses(
size_t max_addresses,
size_t max_pct);
330 std::vector<CAddress>
GetAddresses(
CNode& requestor,
size_t max_addresses,
size_t max_pct);
345 bool AddNode(
const std::string& node);
419 const std::vector<CService>& binds,
420 const std::vector<NetWhitebindPermissions>& whiteBinds,
421 const std::vector<CService>& onion_binds);
432 bool GenerateSelectSet(std::set<SOCKET> &recv_set, std::set<SOCKET> &send_set, std::set<SOCKET> &error_set);
433 void SocketEvents(std::set<SOCKET> &recv_set, std::set<SOCKET> &send_set, std::set<SOCKET> &error_set);
761 virtual int Read(
const char *data,
unsigned int bytes) = 0;
782 int readHeader(
const char *pch,
unsigned int nBytes);
783 int readData(
const char *pch,
unsigned int nBytes);
800 hdrbuf(nTypeIn, nVersionIn),
801 vRecv(nTypeIn, nVersionIn)
817 int Read(
const char *pch,
unsigned int nBytes)
override {
819 if (ret < 0)
Reset();
1051 std::atomic<std::chrono::microseconds>
m_ping_start{std::chrono::microseconds{0}};
1059 CNode(
NodeId id,
ServiceFlags nLocalServicesIn,
int nMyStartingHeightIn,
SOCKET hSocketIn,
const CAddress &addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn,
const CAddress &addrBindIn,
const std::string &addrNameIn,
ConnectionType conn_type_in,
bool inbound_onion =
false);
1121 bool ReceiveMsgBytes(
const char *pch,
unsigned int nBytes,
bool& complete);
1180 m_tx_relay->filterInventoryKnown.insert(hash);
1188 if (!
m_tx_relay->filterInventoryKnown.contains(hash)) {
1189 m_tx_relay->setInventoryTxToSend.insert(hash);
1213 inline std::chrono::microseconds
PoissonNextSend(std::chrono::microseconds
now, std::chrono::seconds average_interval)
1215 return std::chrono::microseconds{
PoissonNextSend(
now.count(), average_interval.count())};
int64_t CAmount
Amount in satoshis (Can be negative)
Stochastical (IP) address manager.
std::vector< bool > m_asmap
A CService with information about it as peer.
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
Signals for UI communication.
std::condition_variable condMsgProc
uint64_t nTotalBytesSent GUARDED_BY(cs_totalBytesSent)
std::vector< CAddress > GetAddresses(size_t max_addresses, size_t max_pct)
std::thread threadMessageHandler
void ForEachNode(const NodeFn &func)
void ThreadOpenAddedConnections()
int GetBestHeight() const
bool GetTryNewOutboundPeer()
void ForEachNode(const NodeFn &func) const
bool ForNode(NodeId id, std::function< bool(CNode *pnode)> func)
size_t SocketSendData(CNode *pnode) const
bool InitBinds(const std::vector< CService > &binds, const std::vector< NetWhitebindPermissions > &whiteBinds, const std::vector< CService > &onion_binds)
CNode * ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure, ConnectionType conn_type)
void DeleteNode(CNode *pnode)
bool AddNewAddresses(const std::vector< CAddress > &vAddr, const CAddress &addrFrom, int64_t nTimePenalty=0)
bool AttemptToEvictConnection()
Try to find a connection to evict when the node is full.
bool GetNetworkActive() const
bool AlreadyConnectedToAddress(const CAddress &addr)
Determine whether we're already connected to a given address, in order to avoid initiating duplicate ...
void AddAddrFetch(const std::string &strDest)
void ForEachNodeThen(Callable &&pre, CallableAfter &&post) const
ServiceFlags nLocalServices
Services this instance offers.
size_t GetNodeCount(NumConnections num)
int m_max_outbound_block_relay
std::vector< CNode * > vNodes GUARDED_BY(cs_vNodes)
void SetTryNewOutboundPeer(bool flag)
std::atomic< bool > flagInterruptMsgProc
unsigned int GetReceiveFloodSize() const
std::list< CNode * > vNodesDisconnected
uint64_t GetTotalBytesRecv()
void SetBestHeight(int height)
void ForEachNodeThen(Callable &&pre, CallableAfter &&post)
void SocketEvents(std::set< SOCKET > &recv_set, std::set< SOCKET > &send_set, std::set< SOCKET > &error_set)
std::vector< std::string > vAddedNodes GUARDED_BY(cs_vAddedNodes)
CThreadInterrupt interruptNet
std::unique_ptr< CSemaphore > semAddnode
uint64_t GetMaxOutboundTimeframe()
std::atomic< NodeId > nLastNodeId
void SetMaxOutboundTimeframe(uint64_t timeframe)
set the timeframe for the max outbound target
void SetServices(const CService &addr, ServiceFlags nServices)
uint64_t GetOutboundTargetBytesLeft()
response the bytes left in the current max outbound cycle in case of no limit, it will always respons...
void RecordBytesSent(uint64_t bytes)
bool fMsgProcWake GUARDED_BY(mutexMsgProc)
flag for waking the message processor.
BanMan * m_banman
Pointer to this node's banman.
std::thread threadDNSAddressSeed
void ThreadOpenConnections(std::vector< std::string > connect)
std::vector< CAddress > m_anchors
Addresses that were saved during the previous clean shutdown.
RecursiveMutex m_addr_fetches_mutex
friend struct ConnmanTestMsg
unsigned int nPrevNodeCount
void NotifyNumConnectionsChanged()
ServiceFlags GetLocalServices() const
Used to convey which local services we are offering peers during node connection.
bool DisconnectNode(const std::string &node)
std::atomic_bool m_try_another_outbound_peer
flag for deciding to connect to an extra outbound peer, in excess of m_max_outbound_full_relay This t...
uint64_t nMaxOutboundTotalBytesSentInCycle GUARDED_BY(cs_totalBytesSent)
std::vector< ListenSocket > vhListenSocket
std::vector< CAddress > GetCurrentBlockRelayOnlyConns() const
Return vector of current BLOCK_RELAY peers.
CClientUIInterface * clientInterface
CSipHasher GetDeterministicRandomizer(uint64_t id) const
Get a unique deterministic randomizer.
std::unique_ptr< CSemaphore > semOutbound
std::vector< NetWhitelistPermissions > vWhitelistedRange
void ThreadSocketHandler()
RecursiveMutex cs_totalBytesSent
bool Bind(const CService &addr, unsigned int flags, NetPermissionFlags permissions)
std::thread threadOpenConnections
int64_t m_peer_connect_timeout
CNode * FindNode(const CNetAddr &ip)
void Init(const Options &connOptions)
void MarkAddressGood(const CAddress &addr)
const uint64_t nSeed0
SipHasher seeds for deterministic randomness.
unsigned int nReceiveFloodSize
CConnman(uint64_t seed0, uint64_t seed1, bool network_active=true)
RecursiveMutex cs_totalBytesRecv
static bool NodeFullyConnected(const CNode *pnode)
std::atomic< int64_t > m_next_send_inv_to_incoming
std::deque< std::string > m_addr_fetches GUARDED_BY(m_addr_fetches_mutex)
uint64_t nMaxOutboundCycleStartTime GUARDED_BY(cs_totalBytesSent)
uint64_t nTotalBytesRecv GUARDED_BY(cs_totalBytesRecv)
void SetMaxOutboundTarget(uint64_t limit)
set the max outbound target in bytes
void WakeMessageHandler()
void SetNetworkActive(bool active)
uint64_t GetMaxOutboundTarget()
void OpenNetworkConnection(const CAddress &addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound, const char *strDest, ConnectionType conn_type)
void SetAsmap(std::vector< bool > asmap)
bool OutboundTargetReached(bool historicalBlockServingLimit)
check if the outbound target is reached if param historicalBlockServingLimit is set true,...
void AddWhitelistPermissionFlags(NetPermissionFlags &flags, const CNetAddr &addr) const
bool Start(CScheduler &scheduler, const Options &options)
bool GenerateSelectSet(std::set< SOCKET > &recv_set, std::set< SOCKET > &send_set, std::set< SOCKET > &error_set)
void ThreadDNSAddressSeed()
void ThreadMessageHandler()
uint64_t CalculateKeyedNetGroup(const CAddress &ad) const
bool fAddressesInitialized
uint64_t GetTotalBytesSent()
uint64_t GetMaxOutboundTimeLeftInCycle()
response the time in second left in the current max outbound cycle in case of no limit,...
RecursiveMutex cs_vAddedNodes
std::thread threadOpenAddedConnections
int64_t PoissonNextSendInbound(int64_t now, int average_interval_seconds)
Attempts to obfuscate tx time through exponentially distributed emitting.
friend struct CConnmanTest
void InactivityCheck(CNode *pnode)
std::atomic< int > nBestHeight
bool CheckIncomingNonce(uint64_t nonce)
int m_max_outbound_full_relay
int GetExtraOutboundCount()
void RecordBytesRecv(uint64_t bytes)
std::vector< AddedNodeInfo > GetAddedNodeInfo()
void GetNodeStats(std::vector< CNodeStats > &vstats)
void PushMessage(CNode *pnode, CSerializedNetMsg &&msg)
bool GetUseAddrmanOutgoing() const
unsigned int nSendBufferMaxSize
uint64_t nMaxOutboundTimeframe GUARDED_BY(cs_totalBytesSent)
bool m_use_addrman_outgoing
std::map< uint64_t, CachedAddrResponse > m_addr_response_caches
Addr responses stored in different caches per (network, local socket) prevent cross-network node iden...
std::function< void(CNode *)> NodeFn
NetEventsInterface * m_msgproc
uint64_t nMaxOutboundLimit GUARDED_BY(cs_totalBytesSent)
std::atomic< bool > fNetworkActive
std::vector< CService > m_onion_binds
A vector of -bind=<address>:<port>=onion arguments each of which is an address and port that are desi...
bool AddNode(const std::string &node)
std::thread threadSocketHandler
bool RemoveAddedNode(const std::string &node)
void AcceptConnection(const ListenSocket &hListenSocket)
bool BindListenPort(const CService &bindAddr, bilingual_str &strError, NetPermissionFlags permissions)
Double ended buffer combining vector and stream-like interfaces.
void resize(size_type n, value_type c=0)
A hasher class for Bitcoin's 256-bit hash (double SHA-256).
bool IsAddrV1Compatible() const
Check if the current object can be serialized in pre-ADDRv2/BIP155 format.
Transport protocol agnostic message container.
CNetMessage(CDataStream &&recv_in)
uint32_t m_message_size
size of the payload
std::chrono::microseconds m_time
time of message receipt
CDataStream m_recv
received message data
void SetVersion(int nVersionIn)
uint32_t m_raw_message_size
used wire size of the message (including header/checksum)
Information about a peer.
RecursiveMutex cs_vProcessMsg
std::atomic< int64_t > nLastSend
bool IsFeelerConn() const
bool ExpectServicesFromConn() const
std::atomic< int > nVersion
uint64_t nRecvBytes GUARDED_BY(cs_vRecv)
bool IsInboundConn() const
std::deque< std::vector< unsigned char > > vSendMsg GUARDED_BY(cs_vSend)
bool HasPermission(NetPermissionFlags permission) const
std::atomic_bool fPauseRecv
bool IsOutboundOrBlockRelayConn() const
bool IsManualConn() const
void PushTxInventory(const uint256 &hash)
std::atomic< int64_t > nTimeOffset
RecursiveMutex cs_sendProcessing
void PushAddress(const CAddress &_addr, FastRandomContext &insecure_rand)
mapMsgCmdSize mapRecvBytesPerMsgCmd GUARDED_BY(cs_vRecv)
std::atomic< bool > fPingQueued
std::string ConnectionTypeAsString() const
void SetCommonVersion(int greatest_common_version)
std::list< CNetMessage > vRecvMsg
void SetAddrLocal(const CService &addrLocalIn)
May not be called more than once.
std::atomic_bool fSuccessfullyConnected
bool IsAddrFetchConn() const
std::vector< uint256 > vInventoryBlockToSend GUARDED_BY(cs_inventory)
uint64_t GetLocalNonce() const
std::atomic< ServiceFlags > nServices
RecursiveMutex cs_addrLocal
CSemaphoreGrant grantOutbound
const int64_t nTimeConnected
std::string GetAddrName() const
mapMsgCmdSize mapSendBytesPerMsgCmd
const uint64_t nKeyedNetGroup
friend struct ConnmanTestMsg
std::atomic< int > nRefCount
RecursiveMutex cs_addrName
std::atomic< int > m_greatest_common_version
int GetMyStartingHeight() const
bool IsBlockOnlyConn() const
void CloseSocketDisconnect()
int GetCommonVersion() const
bool IsFullOutboundConn() const
std::unique_ptr< TransportSerializer > m_serializer
std::atomic< int > nStartingHeight
std::unique_ptr< CRollingBloomFilter > m_addr_known
std::atomic_bool fPauseSend
SOCKET hSocket GUARDED_BY(cs_hSocket)
std::list< CNetMessage > vProcessMsg GUARDED_BY(cs_vProcessMsg)
const ServiceFlags nLocalServices
Services offered to this peer.
std::unique_ptr< TxRelay > m_tx_relay
std::chrono::microseconds m_next_addr_send GUARDED_BY(cs_sendProcessing)
bool ReceiveMsgBytes(const char *pch, unsigned int nBytes, bool &complete)
Receive bytes from the buffer and deserialize them into messages.
void copyStats(CNodeStats &stats, const std::vector< bool > &m_asmap)
std::atomic< std::chrono::microseconds > m_ping_start
When the last ping was sent, or 0 if no ping was ever sent.
void MaybeSetAddrName(const std::string &addrNameIn)
Sets the addrName only if it was not previously set.
std::unique_ptr< TransportDeserializer > m_deserializer
CNode(NodeId id, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress &addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress &addrBindIn, const std::string &addrNameIn, ConnectionType conn_type_in, bool inbound_onion=false)
NetPermissionFlags m_permissionFlags
void AddAddressKnown(const CAddress &_addr)
std::atomic< int64_t > nLastRecv
std::atomic< int64_t > nLastTXTime
UNIX epoch time of the last transaction received from this peer that we had not yet seen (e....
std::atomic< int64_t > nMinPingUsecTime
std::atomic< uint64_t > nPingNonceSent
RecursiveMutex cs_hSocket
std::vector< CAddress > vAddrToSend
const ConnectionType m_conn_type
Network ConnectedThroughNetwork() const
Get network the peer connected through.
const int nMyStartingHeight
CService addrLocal GUARDED_BY(cs_addrLocal)
const uint64_t nLocalHostNonce
ServiceFlags GetLocalServices() const
std::string cleanSubVer GUARDED_BY(cs_SubVer)
cleanSubVer is a sanitized string of the user agent byte array we read from the wire.
CNode(const CNode &)=delete
std::atomic< int64_t > nPingUsecTime
const bool m_inbound_onion
Whether this peer connected via our Tor onion service.
void AddKnownTx(const uint256 &hash)
std::atomic< int64_t > nLastBlockTime
UNIX epoch time of the last block received from this peer that we had not yet seen (e....
std::atomic_bool m_wants_addrv2
Whether the peer has signaled support for receiving ADDRv2 (BIP155) messages, implying a preference t...
uint64_t nSendBytes GUARDED_BY(cs_vSend)
std::chrono::microseconds m_next_local_addr_send GUARDED_BY(cs_sendProcessing)
bool RelayAddrsWithConn() const
std::atomic_bool fDisconnect
CService GetAddrLocal() const
std::vector< uint256 > vBlockHashesToAnnounce GUARDED_BY(cs_inventory)
CNode & operator=(const CNode &)=delete
std::string addrName GUARDED_BY(cs_addrName)
mapMsgCmdSize mapSendBytesPerMsgCmd
std::string m_conn_type_string
mapMsgCmdSize mapRecvBytesPerMsgCmd
NetPermissionFlags m_permissionFlags
RollingBloomFilter is a probabilistic "keep track of most recently inserted" set.
Simple class for background tasks that should be run periodically or once "after a while".
RAII-style semaphore lock.
A combination of a network address (CNetAddr) and a (TCP) port.
std::vector< unsigned char > GetKey() const
uint64_t randrange(uint64_t range) noexcept
Generate a random integer in the range [0..range).
Interface for message handling.
virtual void InitializeNode(CNode *pnode)=0
virtual bool SendMessages(CNode *pnode)=0
virtual bool ProcessMessages(CNode *pnode, std::atomic< bool > &interrupt)=0
~NetEventsInterface()=default
Protected destructor so that instances can only be deleted by derived classes.
virtual void FinalizeNode(const CNode &node, bool &update_connection_time)=0
static void AddFlag(NetPermissionFlags &flags, NetPermissionFlags f)
static bool HasFlag(const NetPermissionFlags &flags, NetPermissionFlags f)
The TransportDeserializer takes care of holding and deserializing the network receive buffer.
virtual Optional< CNetMessage > GetMessage(std::chrono::microseconds time, uint32_t &out_err)=0
virtual ~TransportDeserializer()
virtual bool Complete() const =0
virtual int Read(const char *data, unsigned int bytes)=0
virtual void SetVersion(int version)=0
The TransportSerializer prepares messages for the network transport.
virtual void prepareForTransport(CSerializedNetMsg &msg, std::vector< unsigned char > &header)=0
virtual ~TransportSerializer()
const CChainParams & m_chain_params
Optional< CNetMessage > GetMessage(std::chrono::microseconds time, uint32_t &out_err_raw_size) override
const uint256 & GetMessageHash() const
int readHeader(const char *pch, unsigned int nBytes)
int readData(const char *pch, unsigned int nBytes)
int Read(const char *pch, unsigned int nBytes) override
V1TransportDeserializer(const CChainParams &chain_params, const NodeId node_id, int nTypeIn, int nVersionIn)
void SetVersion(int nVersionIn) override
bool Complete() const override
void prepareForTransport(CSerializedNetMsg &msg, std::vector< unsigned char > &header) override
CAddress GetLocalAddress(const CNetAddr *paddrPeer, ServiceFlags nLocalServices)
bool IsPeerAddrLocalGood(CNode *pnode)
static constexpr size_t MAX_ADDR_TO_SEND
The maximum number of addresses from our addrman to return in response to a getaddr message.
static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS
The maximum number of peer connections to maintain.
void AdvertiseLocal(CNode *pnode)
bool IsLocal(const CService &addr)
check whether a given address is potentially local
void RemoveLocal(const CService &addr)
static const unsigned int MAX_SUBVERSION_LENGTH
Maximum length of the user agent string in version message.
static const int MAX_ADDNODE_CONNECTIONS
Maximum number of addnode outgoing nodes.
bool AddLocal(const CService &addr, int nScore=LOCAL_NONE)
static const size_t DEFAULT_MAXSENDBUFFER
static const bool DEFAULT_BLOCKSONLY
Default for blocks only.
static const bool DEFAULT_WHITELISTFORCERELAY
Default for -whitelistforcerelay.
static const bool DEFAULT_FORCEDNSSEED
static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH
Maximum length of incoming protocol messages (no message over 4 MB is currently acceptable).
static const int FEELER_INTERVAL
Run the feeler connection loop once every 2 minutes or 120 seconds.
static const bool DEFAULT_WHITELISTRELAY
Default for -whitelistrelay.
RecursiveMutex cs_mapLocalHost
static const size_t DEFAULT_MAXRECEIVEBUFFER
std::string strSubVersion
Subversion as sent to the P2P network in version messages.
const std::string NET_MESSAGE_COMMAND_OTHER
static const int TIMEOUT_INTERVAL
Time after which to disconnect, after waiting for a ping response (or inactivity).
void SetReachable(enum Network net, bool reachable)
Mark a network as reachable or unreachable (no automatic connects to it)
static const uint64_t MAX_UPLOAD_TIMEFRAME
The default timeframe for -maxuploadtarget.
static const bool DEFAULT_UPNP
-upnp default
ConnectionType
Different types of connections to a peer.
@ BLOCK_RELAY
We use block-relay-only connections to help prevent against partition attacks.
@ MANUAL
We open manual connections to addresses that users explicitly inputted via the addnode RPC,...
@ OUTBOUND_FULL_RELAY
These are the default connections that we use to connect with the network.
@ FEELER
Feeler connections are short-lived connections made to check that a node is alive.
@ INBOUND
Inbound connections are those initiated by a peer.
@ ADDR_FETCH
AddrFetch connections are short lived connections used to solicit addresses from peers.
std::map< CNetAddr, LocalServiceInfo > mapLocalHost GUARDED_BY(cs_mapLocalHost)
std::map< std::string, uint64_t > mapMsgCmdSize
static const uint64_t DEFAULT_MAX_UPLOAD_TARGET
The default for -maxuploadtarget.
static const int MAX_FEELER_CONNECTIONS
Maximum number of feeler connections.
static const bool DEFAULT_LISTEN
-listen default
bool GetLocal(CService &addr, const CNetAddr *paddrPeer=nullptr)
static const int64_t DEFAULT_PEER_CONNECT_TIMEOUT
-peertimeout default
int64_t PoissonNextSend(int64_t now, int average_interval_seconds)
Return a timestamp in the future (in microseconds) for exponentially distributed events.
static const int MAX_OUTBOUND_FULL_RELAY_CONNECTIONS
Maximum number of automatic outgoing nodes over which we'll relay everything (blocks,...
static const int MAX_BLOCK_RELAY_ONLY_CONNECTIONS
Maximum number of block-relay-only outgoing connections.
bool IsReachable(enum Network net)
bool SeenLocal(const CService &addr)
vote for a local address
const std::chrono::seconds now
boost::optional< T > Optional
Substitute for C++17 std::optional.
ServiceFlags
nServices flags
Cache responses to addr requests to minimize privacy leak.
std::chrono::microseconds m_cache_entry_expiration
std::vector< CAddress > m_addrs_response_cache
void AddSocketPermissionFlags(NetPermissionFlags &flags) const
ListenSocket(SOCKET socket_, NetPermissionFlags permissions_)
NetPermissionFlags m_permissions
int m_max_outbound_block_relay
unsigned int nReceiveFloodSize
int m_max_outbound_full_relay
std::vector< NetWhitebindPermissions > vWhiteBinds
uint64_t nMaxOutboundLimit
std::vector< NetWhitelistPermissions > vWhitelistedRange
CClientUIInterface * uiInterface
std::vector< CService > onion_binds
std::vector< std::string > m_specified_outgoing
uint64_t nMaxOutboundTimeframe
NetEventsInterface * m_msgproc
ServiceFlags nLocalServices
std::vector< bool > m_asmap
std::vector< std::string > m_added_nodes
int64_t m_peer_connect_timeout
std::vector< CService > vBinds
unsigned int nSendBufferMaxSize
std::vector< std::string > vSeedNodes
bool m_use_addrman_outgoing
CRollingBloomFilter filterInventoryKnown GUARDED_BY(cs_tx_inventory)
std::set< uint256 > setInventoryTxToSend
CAmount lastSentFeeFilter
std::chrono::microseconds nNextInvSend
RecursiveMutex cs_feeFilter
bool fSendMempool GUARDED_BY(cs_tx_inventory)
CAmount minFeeFilter GUARDED_BY(cs_feeFilter)
int64_t nextSendTimeFeeFilter
std::atomic< std::chrono::seconds > m_last_mempool_req
bool fRelayTxes GUARDED_BY(cs_filter)
RecursiveMutex cs_tx_inventory
std::unique_ptr< CBloomFilter > pfilter PT_GUARDED_BY(cs_filter) GUARDED_BY(cs_filter)
CSerializedNetMsg(const CSerializedNetMsg &msg)=delete
CSerializedNetMsg & operator=(const CSerializedNetMsg &)=delete
CSerializedNetMsg()=default
CSerializedNetMsg(CSerializedNetMsg &&)=default
CSerializedNetMsg & operator=(CSerializedNetMsg &&)=default
std::vector< unsigned char > data
static const int INIT_PROTO_VERSION
initial proto version, to be increased after version/verack negotiation