@@ -948,7 +948,7 @@ bool CConnman::AttemptToEvictConnection()
948
948
continue ;
949
949
if (node->fDisconnect )
950
950
continue ;
951
- NodeEvictionCandidate candidate = {node->id , node->nTimeConnected , node->nMinPingUsecTime ,
951
+ NodeEvictionCandidate candidate = {node->GetId () , node->nTimeConnected , node->nMinPingUsecTime ,
952
952
node->nLastBlockTime , node->nLastTXTime ,
953
953
(node->nServices & nRelevantServices) == nRelevantServices,
954
954
node->fRelayTxes , node->pfilter != NULL , node->addr , node->nKeyedNetGroup };
@@ -1374,7 +1374,7 @@ void CConnman::ThreadSocketHandler()
1374
1374
{
1375
1375
if (pnode->nLastRecv == 0 || pnode->nLastSend == 0 )
1376
1376
{
1377
- LogPrint (BCLog::NET, " socket no message in first 60 seconds, %d %d from %d\n " , pnode->nLastRecv != 0 , pnode->nLastSend != 0 , pnode->id );
1377
+ LogPrint (BCLog::NET, " socket no message in first 60 seconds, %d %d from %d\n " , pnode->nLastRecv != 0 , pnode->nLastSend != 0 , pnode->GetId () );
1378
1378
pnode->fDisconnect = true ;
1379
1379
}
1380
1380
else if (nTime - pnode->nLastSend > TIMEOUT_INTERVAL)
@@ -1394,7 +1394,7 @@ void CConnman::ThreadSocketHandler()
1394
1394
}
1395
1395
else if (!pnode->fSuccessfullyConnected )
1396
1396
{
1397
- LogPrintf (" version handshake timeout from %d\n " , pnode->id );
1397
+ LogPrintf (" version handshake timeout from %d\n " , pnode->GetId () );
1398
1398
pnode->fDisconnect = true ;
1399
1399
}
1400
1400
}
@@ -2487,7 +2487,7 @@ bool CConnman::DisconnectNode(NodeId id)
2487
2487
{
2488
2488
LOCK (cs_vNodes);
2489
2489
for (CNode* pnode : vNodes) {
2490
- if (id == pnode->id ) {
2490
+ if (id == pnode->GetId () ) {
2491
2491
pnode->fDisconnect = true ;
2492
2492
return true ;
2493
2493
}
@@ -2625,10 +2625,10 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
2625
2625
nTimeConnected(GetSystemTimeInSeconds()),
2626
2626
addr(addrIn),
2627
2627
fInbound(fInboundIn ),
2628
- id(idIn),
2629
2628
nKeyedNetGroup(nKeyedNetGroupIn),
2630
2629
addrKnown(5000 , 0.001 ),
2631
2630
filterInventoryKnown(50000 , 0.000001 ),
2631
+ id(idIn),
2632
2632
nLocalHostNonce(nLocalHostNonceIn),
2633
2633
nLocalServices(nLocalServicesIn),
2634
2634
nMyStartingHeight(nMyStartingHeightIn),
@@ -2744,7 +2744,7 @@ void CConnman::PushMessage(CNode* pnode, CSerializedNetMsg&& msg)
2744
2744
{
2745
2745
size_t nMessageSize = msg.data .size ();
2746
2746
size_t nTotalSize = nMessageSize + CMessageHeader::HEADER_SIZE;
2747
- LogPrint (BCLog::NET, " sending %s (%d bytes) peer=%d\n " , SanitizeString (msg.command .c_str ()), nMessageSize, pnode->id );
2747
+ LogPrint (BCLog::NET, " sending %s (%d bytes) peer=%d\n " , SanitizeString (msg.command .c_str ()), nMessageSize, pnode->GetId () );
2748
2748
2749
2749
std::vector<unsigned char > serializedHeader;
2750
2750
serializedHeader.reserve (CMessageHeader::HEADER_SIZE);
@@ -2782,7 +2782,7 @@ bool CConnman::ForNode(NodeId id, std::function<bool(CNode* pnode)> func)
2782
2782
CNode* found = nullptr ;
2783
2783
LOCK (cs_vNodes);
2784
2784
for (auto && pnode : vNodes) {
2785
- if (pnode->id == id) {
2785
+ if (pnode->GetId () == id) {
2786
2786
found = pnode;
2787
2787
break ;
2788
2788
}
0 commit comments