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

Actual implementation for TxReconciliationTracker's data structure. More...

Collaboration diagram for TxReconciliationTracker::Impl:
[legend]

Public Member Functions

 Impl (uint32_t recon_version)
 
uint64_t PreRegisterPeer (NodeId peer_id) EXCLUSIVE_LOCKS_REQUIRED(!m_txreconciliation_mutex)
 
ReconciliationRegisterResult RegisterPeer (NodeId peer_id, bool is_peer_inbound, uint32_t peer_recon_version, uint64_t remote_salt) EXCLUSIVE_LOCKS_REQUIRED(!m_txreconciliation_mutex)
 
void ForgetPeer (NodeId peer_id) EXCLUSIVE_LOCKS_REQUIRED(!m_txreconciliation_mutex)
 
bool IsPeerRegistered (NodeId peer_id) const EXCLUSIVE_LOCKS_REQUIRED(!m_txreconciliation_mutex)
 

Private Member Functions

std::unordered_map< NodeId, std::variant< uint64_t, TxReconciliationState > > m_states GUARDED_BY (m_txreconciliation_mutex)
 Keeps track of txreconciliation states of eligible peers. More...
 

Private Attributes

Mutex m_txreconciliation_mutex
 
uint32_t m_recon_version
 

Detailed Description

Actual implementation for TxReconciliationTracker's data structure.

Definition at line 63 of file txreconciliation.cpp.

Constructor & Destructor Documentation

◆ Impl()

TxReconciliationTracker::Impl::Impl ( uint32_t  recon_version)
inlineexplicit

Definition at line 80 of file txreconciliation.cpp.

Member Function Documentation

◆ ForgetPeer()

void TxReconciliationTracker::Impl::ForgetPeer ( NodeId  peer_id)
inline

Definition at line 128 of file txreconciliation.cpp.

◆ GUARDED_BY()

std::unordered_map< NodeId, std::variant< uint64_t, TxReconciliationState > > m_states TxReconciliationTracker::Impl::GUARDED_BY ( m_txreconciliation_mutex  )
private

Keeps track of txreconciliation states of eligible peers.

For pre-registered peers, the locally generated salt is stored. For registered peers, the locally generated salt is forgotten, and the state (including "full" salt) is stored instead.

◆ IsPeerRegistered()

bool TxReconciliationTracker::Impl::IsPeerRegistered ( NodeId  peer_id) const
inline

Definition at line 137 of file txreconciliation.cpp.

◆ PreRegisterPeer()

uint64_t TxReconciliationTracker::Impl::PreRegisterPeer ( NodeId  peer_id)
inline

Definition at line 82 of file txreconciliation.cpp.

Here is the call graph for this function:

◆ RegisterPeer()

ReconciliationRegisterResult TxReconciliationTracker::Impl::RegisterPeer ( NodeId  peer_id,
bool  is_peer_inbound,
uint32_t  peer_recon_version,
uint64_t  remote_salt 
)
inline

Definition at line 96 of file txreconciliation.cpp.

Member Data Documentation

◆ m_recon_version

uint32_t TxReconciliationTracker::Impl::m_recon_version
private

Definition at line 69 of file txreconciliation.cpp.

◆ m_txreconciliation_mutex

Mutex TxReconciliationTracker::Impl::m_txreconciliation_mutex
mutableprivate

Definition at line 66 of file txreconciliation.cpp.


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