Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
CConnman::NodesSnapshot Class Reference

RAII helper to atomically create a copy of m_nodes and add a reference to each of the nodes. More...

Public Member Functions

 NodesSnapshot (const CConnman &connman, bool shuffle)
 
 ~NodesSnapshot ()
 
const std::vector< CNode * > & Nodes () const
 

Private Attributes

std::vector< CNode * > m_nodes_copy
 

Detailed Description

RAII helper to atomically create a copy of m_nodes and add a reference to each of the nodes.

The nodes are released when this object is destroyed.

Definition at line 1625 of file net.h.

Constructor & Destructor Documentation

◆ NodesSnapshot()

CConnman::NodesSnapshot::NodesSnapshot ( const CConnman connman,
bool  shuffle 
)
inlineexplicit

Definition at line 1628 of file net.h.

◆ ~NodesSnapshot()

CConnman::NodesSnapshot::~NodesSnapshot ( )
inline

Definition at line 1642 of file net.h.

Member Function Documentation

◆ Nodes()

const std::vector< CNode * > & CConnman::NodesSnapshot::Nodes ( ) const
inline

Definition at line 1649 of file net.h.

Member Data Documentation

◆ m_nodes_copy

std::vector<CNode*> CConnman::NodesSnapshot::m_nodes_copy
private

Definition at line 1655 of file net.h.


The documentation for this class was generated from the following file: