Changeset View
Changeset View
Standalone View
Standalone View
src/net.cpp
Show First 20 Lines • Show All 561 Lines • ▼ Show 20 Lines | if (addrLocal.IsValid()) { | ||||
error("Addr local already set for node: %i. Refusing to change from %s " | error("Addr local already set for node: %i. Refusing to change from %s " | ||||
"to %s", | "to %s", | ||||
id, addrLocal.ToString(), addrLocalIn.ToString()); | id, addrLocal.ToString(), addrLocalIn.ToString()); | ||||
} else { | } else { | ||||
addrLocal = addrLocalIn; | addrLocal = addrLocalIn; | ||||
} | } | ||||
} | } | ||||
Network CNode::ConnectedThroughNetwork() const { | |||||
return IsInboundConn() && m_inbound_onion ? NET_ONION : addr.GetNetClass(); | |||||
} | |||||
void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap) { | void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap) { | ||||
stats.nodeid = this->GetId(); | stats.nodeid = this->GetId(); | ||||
stats.nServices = nServices; | stats.nServices = nServices; | ||||
stats.addr = addr; | stats.addr = addr; | ||||
stats.addrBind = addrBind; | stats.addrBind = addrBind; | ||||
stats.m_mapped_as = addr.GetMappedAS(m_asmap); | stats.m_mapped_as = addr.GetMappedAS(m_asmap); | ||||
if (m_tx_relay != nullptr) { | if (m_tx_relay != nullptr) { | ||||
LOCK(m_tx_relay->cs_filter); | LOCK(m_tx_relay->cs_filter); | ||||
▲ Show 20 Lines • Show All 2,815 Lines • Show Last 20 Lines |