mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge #21395: Net processing: Remove unused CNode.address member
a6b0fe206f4a696e7646e229731a891502c44405 [net processing] Remove unused CNode.address member (John Newbery) Pull request description: ACKs for top commit: practicalswift: cr ACK a6b0fe206f4a696e7646e229731a891502c44405: patch looks correct and unused code should be removed fanquake: ACK a6b0fe206f4a696e7646e229731a891502c44405 Tree-SHA512: 6022674dabe79be580d8005ac9e308d444d35588f324a7bb9f1ab04e8ad8ac41355c58ddfb016b001fd80a1a01ebcbddb2919ae9d33faccec2044af88547a79f
This commit is contained in:
parent
2dacfb08bd
commit
6423f6bc5d
@ -701,8 +701,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;
|
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.
|
||||||
@ -849,8 +847,8 @@ struct CNodeState {
|
|||||||
//! A rolling bloom filter of all announced tx CInvs to this peer.
|
//! A rolling bloom filter of all announced tx CInvs to this peer.
|
||||||
CRollingBloomFilter m_recently_announced_invs = CRollingBloomFilter{INVENTORY_MAX_RECENT_RELAY, 0.000001};
|
CRollingBloomFilter m_recently_announced_invs = CRollingBloomFilter{INVENTORY_MAX_RECENT_RELAY, 0.000001};
|
||||||
|
|
||||||
CNodeState(CAddress addrIn, bool is_inbound) :
|
CNodeState(bool is_inbound) :
|
||||||
address(addrIn), m_is_inbound(is_inbound)
|
m_is_inbound(is_inbound)
|
||||||
{
|
{
|
||||||
pindexBestKnownBlock = nullptr;
|
pindexBestKnownBlock = nullptr;
|
||||||
hashLastUnknownBlock.SetNull();
|
hashLastUnknownBlock.SetNull();
|
||||||
@ -1352,11 +1350,10 @@ void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PeerManagerImpl::InitializeNode(CNode *pnode) {
|
void PeerManagerImpl::InitializeNode(CNode *pnode) {
|
||||||
CAddress addr = pnode->addr;
|
|
||||||
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()));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PeerRef peer = std::make_shared<Peer>(nodeid);
|
PeerRef peer = std::make_shared<Peer>(nodeid);
|
||||||
|
Loading…
Reference in New Issue
Block a user