Skip to content

Commit 6423f6b

Browse files
MarcoFalkePastaPastaPasta
authored andcommitted
Merge bitcoin#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
1 parent 2dacfb0 commit 6423f6b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/net_processing.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,6 @@ namespace {
701701
* and we're no longer holding the node's locks.
702702
*/
703703
struct CNodeState {
704-
//! The peer's address
705-
const CService address;
706704
//! The best known block we know this peer has announced.
707705
const CBlockIndex *pindexBestKnownBlock;
708706
//! The hash of the last unknown block this peer has announced.
@@ -849,8 +847,8 @@ struct CNodeState {
849847
//! A rolling bloom filter of all announced tx CInvs to this peer.
850848
CRollingBloomFilter m_recently_announced_invs = CRollingBloomFilter{INVENTORY_MAX_RECENT_RELAY, 0.000001};
851849

852-
CNodeState(CAddress addrIn, bool is_inbound) :
853-
address(addrIn), m_is_inbound(is_inbound)
850+
CNodeState(bool is_inbound) :
851+
m_is_inbound(is_inbound)
854852
{
855853
pindexBestKnownBlock = nullptr;
856854
hashLastUnknownBlock.SetNull();
@@ -1352,11 +1350,10 @@ void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds)
13521350
}
13531351

13541352
void PeerManagerImpl::InitializeNode(CNode *pnode) {
1355-
CAddress addr = pnode->addr;
13561353
NodeId nodeid = pnode->GetId();
13571354
{
13581355
LOCK(cs_main);
1359-
mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(addr, pnode->IsInboundConn()));
1356+
mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(pnode->IsInboundConn()));
13601357
}
13611358
{
13621359
PeerRef peer = std::make_shared<Peer>(nodeid);

0 commit comments

Comments
 (0)