aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-03-10 10:41:33 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-03-10 10:41:37 +0100
commit7cdadf91d513250b983b6a1c4672a6acc0dcf074 (patch)
tree4b88a9a2872184d8be8ab21ce41c7399a604b1a4
parenteea6196c3d8056e51e1780a44ac7f599331247e5 (diff)
parenta6b0fe206f4a696e7646e229731a891502c44405 (diff)
Merge #21395: Net processing: Remove unused CNode.address member
a6b0fe206f4a696e7646e229731a891502c44405 [net processing] Remove unused CNode.address member (John Newbery) Pull request description: ACKs for top commit: practicalswift: cr ACK a6b0fe206f4a696e7646e229731a891502c44405: patch looks correct and unused code should be removed fanquake: ACK a6b0fe206f4a696e7646e229731a891502c44405 Tree-SHA512: 6022674dabe79be580d8005ac9e308d444d35588f324a7bb9f1ab04e8ad8ac41355c58ddfb016b001fd80a1a01ebcbddb2919ae9d33faccec2044af88547a79f
-rw-r--r--src/net_processing.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 638c39e6be..86bafe6d27 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -488,8 +488,6 @@ namespace {
* and we're no longer holding the node's locks.
*/
struct CNodeState {
- //! The peer's address
- const CService address;
//! The best known block we know this peer has announced.
const CBlockIndex* pindexBestKnownBlock{nullptr};
//! The hash of the last unknown block this peer has announced.
@@ -582,8 +580,8 @@ struct CNodeState {
//! Whether this peer relays txs via wtxid
bool m_wtxid_relay{false};
- CNodeState(CAddress addrIn, bool is_inbound)
- : address(addrIn), m_is_inbound(is_inbound)
+ CNodeState(bool is_inbound)
+ : m_is_inbound(is_inbound)
{
m_recently_announced_invs.reset();
}
@@ -920,12 +918,10 @@ void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds)
void PeerManagerImpl::InitializeNode(CNode *pnode)
{
- CAddress addr = pnode->addr;
- std::string addrName = pnode->GetAddrName();
NodeId nodeid = pnode->GetId();
{
LOCK(cs_main);
- mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(addr, pnode->IsInboundConn()));
+ mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(pnode->IsInboundConn()));
assert(m_txrequest.Count(nodeid) == 0);
}
{