Skip to content

Commit 7cdadf9

Browse files
author
MarcoFalke
committed
Merge #21395: Net processing: Remove unused CNode.address member
a6b0fe2 [net processing] Remove unused CNode.address member (John Newbery) Pull request description: ACKs for top commit: practicalswift: cr ACK a6b0fe2: patch looks correct and unused code should be removed fanquake: ACK a6b0fe2 Tree-SHA512: 6022674dabe79be580d8005ac9e308d444d35588f324a7bb9f1ab04e8ad8ac41355c58ddfb016b001fd80a1a01ebcbddb2919ae9d33faccec2044af88547a79f
2 parents eea6196 + a6b0fe2 commit 7cdadf9

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)