mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
Merge #21395: Net processing: Remove unused CNode.address member
a6b0fe206f
[net processing] Remove unused CNode.address member (John Newbery) Pull request description: ACKs for top commit: practicalswift: cr ACKa6b0fe206f
: patch looks correct and unused code should be removed fanquake: ACKa6b0fe206f
Tree-SHA512: 6022674dabe79be580d8005ac9e308d444d35588f324a7bb9f1ab04e8ad8ac41355c58ddfb016b001fd80a1a01ebcbddb2919ae9d33faccec2044af88547a79f
This commit is contained in:
commit
7cdadf91d5
1 changed files with 3 additions and 7 deletions
|
@ -488,8 +488,6 @@ namespace {
|
||||||
* and we're no longer holding the node's locks.
|
* and we're no longer holding the node's locks.
|
||||||
*/
|
*/
|
||||||
struct CNodeState {
|
struct CNodeState {
|
||||||
//! The peer's address
|
|
||||||
const CService address;
|
|
||||||
//! The best known block we know this peer has announced.
|
//! The best known block we know this peer has announced.
|
||||||
const CBlockIndex* pindexBestKnownBlock{nullptr};
|
const CBlockIndex* pindexBestKnownBlock{nullptr};
|
||||||
//! The hash of the last unknown block this peer has announced.
|
//! The hash of the last unknown block this peer has announced.
|
||||||
|
@ -582,8 +580,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, bool is_inbound)
|
CNodeState(bool is_inbound)
|
||||||
: address(addrIn), m_is_inbound(is_inbound)
|
: m_is_inbound(is_inbound)
|
||||||
{
|
{
|
||||||
m_recently_announced_invs.reset();
|
m_recently_announced_invs.reset();
|
||||||
}
|
}
|
||||||
|
@ -920,12 +918,10 @@ void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds)
|
||||||
|
|
||||||
void PeerManagerImpl::InitializeNode(CNode *pnode)
|
void PeerManagerImpl::InitializeNode(CNode *pnode)
|
||||||
{
|
{
|
||||||
CAddress addr = pnode->addr;
|
|
||||||
std::string addrName = pnode->GetAddrName();
|
|
||||||
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, pnode->IsInboundConn()));
|
mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(pnode->IsInboundConn()));
|
||||||
assert(m_txrequest.Count(nodeid) == 0);
|
assert(m_txrequest.Count(nodeid) == 0);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue