Skip to content

Commit a6b0fe2

Browse files
committed
[net processing] Remove unused CNode.address member
1 parent e175ca9 commit a6b0fe2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/net_processing.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,6 @@ namespace {
488488
* and we're no longer holding the node's locks.
489489
*/
490490
struct CNodeState {
491-
//! The peer's address
492-
const CService address;
493491
//! The best known block we know this peer has announced.
494492
const CBlockIndex* pindexBestKnownBlock{nullptr};
495493
//! The hash of the last unknown block this peer has announced.
@@ -582,8 +580,8 @@ struct CNodeState {
582580
//! Whether this peer relays txs via wtxid
583581
bool m_wtxid_relay{false};
584582

585-
CNodeState(CAddress addrIn, bool is_inbound)
586-
: address(addrIn), m_is_inbound(is_inbound)
583+
CNodeState(bool is_inbound)
584+
: m_is_inbound(is_inbound)
587585
{
588586
m_recently_announced_invs.reset();
589587
}
@@ -920,12 +918,10 @@ void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds)
920918

921919
void PeerManagerImpl::InitializeNode(CNode *pnode)
922920
{
923-
CAddress addr = pnode->addr;
924-
std::string addrName = pnode->GetAddrName();
925921
NodeId nodeid = pnode->GetId();
926922
{
927923
LOCK(cs_main);
928-
mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(addr, pnode->IsInboundConn()));
924+
mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(pnode->IsInboundConn()));
929925
assert(m_txrequest.Count(nodeid) == 0);
930926
}
931927
{

0 commit comments

Comments
 (0)