mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-22 01:52:35 +02:00
[net processing] Remove CNodeState.name
This has been unused since logging peer IPs was removed from
Misbehaving() in a8865f8b
.
This commit is contained in:
parent
ce3bdd0ed1
commit
aba03359a6
@ -280,8 +280,6 @@ struct CNodeState {
|
|||||||
int nMisbehavior;
|
int nMisbehavior;
|
||||||
//! Whether this peer should be disconnected and marked as discouraged (unless it has the noban permission).
|
//! Whether this peer should be disconnected and marked as discouraged (unless it has the noban permission).
|
||||||
bool m_should_discourage;
|
bool m_should_discourage;
|
||||||
//! String name of this peer (debugging/logging purposes).
|
|
||||||
const std::string name;
|
|
||||||
//! The best known block we know this peer has announced.
|
//! The best known block we know this peer has announced.
|
||||||
const CBlockIndex *pindexBestKnownBlock;
|
const CBlockIndex *pindexBestKnownBlock;
|
||||||
//! The hash of the last unknown block this peer has announced.
|
//! The hash of the last unknown block this peer has announced.
|
||||||
@ -430,9 +428,8 @@ struct CNodeState {
|
|||||||
//! Whether this peer relays txs via wtxid
|
//! Whether this peer relays txs via wtxid
|
||||||
bool m_wtxid_relay{false};
|
bool m_wtxid_relay{false};
|
||||||
|
|
||||||
CNodeState(CAddress addrIn, std::string addrNameIn, bool is_inbound, bool is_manual) :
|
CNodeState(CAddress addrIn, bool is_inbound, bool is_manual)
|
||||||
address(addrIn), name(std::move(addrNameIn)), m_is_inbound(is_inbound),
|
: address(addrIn), m_is_inbound(is_inbound), m_is_manual_connection(is_manual)
|
||||||
m_is_manual_connection (is_manual)
|
|
||||||
{
|
{
|
||||||
fCurrentlyConnected = false;
|
fCurrentlyConnected = false;
|
||||||
nMisbehavior = 0;
|
nMisbehavior = 0;
|
||||||
@ -839,7 +836,7 @@ void PeerLogicValidation::InitializeNode(CNode *pnode) {
|
|||||||
NodeId nodeid = pnode->GetId();
|
NodeId nodeid = pnode->GetId();
|
||||||
{
|
{
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(addr, std::move(addrName), pnode->IsInboundConn(), pnode->IsManualConn()));
|
mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(addr, pnode->IsInboundConn(), pnode->IsManualConn()));
|
||||||
}
|
}
|
||||||
if(!pnode->IsInboundConn())
|
if(!pnode->IsInboundConn())
|
||||||
PushNodeVersion(*pnode, *connman, GetTime());
|
PushNodeVersion(*pnode, *connman, GetTime());
|
||||||
|
Loading…
Reference in New Issue
Block a user