Bitcoin Core 30.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
FuzzedNetEvents Class Reference

#include <net.h>

Inheritance diagram for FuzzedNetEvents:
[legend]
Collaboration diagram for FuzzedNetEvents:
[legend]

Public Member Functions

 FuzzedNetEvents (FuzzedDataProvider &fdp)
 
virtual void InitializeNode (const CNode &, ServiceFlags) override
 Initialize a peer (setup state) More...
 
virtual void FinalizeNode (const CNode &) override
 Handle removal of a peer (clear state) More...
 
virtual bool HasAllDesirableServiceFlags (ServiceFlags) const override
 Callback to determine whether the given set of service flags are sufficient for a peer to be "relevant". More...
 
virtual bool ProcessMessages (CNode *, std::atomic< bool > &) override
 Process protocol messages received from a given node. More...
 
virtual bool SendMessages (CNode *) override
 Send queued protocol messages to a given node. More...
 
virtual void InitializeNode (const CNode &node, ServiceFlags our_services)=0
 Initialize a peer (setup state) More...
 
virtual void FinalizeNode (const CNode &node)=0
 Handle removal of a peer (clear state) More...
 
virtual bool HasAllDesirableServiceFlags (ServiceFlags services) const =0
 Callback to determine whether the given set of service flags are sufficient for a peer to be "relevant". More...
 
virtual bool ProcessMessages (CNode *pnode, std::atomic< bool > &interrupt) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex)=0
 Process protocol messages received from a given node. More...
 
virtual bool SendMessages (CNode *pnode) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex)=0
 Send queued protocol messages to a given node. More...
 

Private Attributes

FuzzedDataProviderm_fdp
 

Additional Inherited Members

- Static Public Attributes inherited from NetEventsInterface
static Mutex g_msgproc_mutex
 Mutex for anything that is only accessed via the msg processing thread. More...
 
- Protected Member Functions inherited from NetEventsInterface
 ~NetEventsInterface ()=default
 Protected destructor so that instances can only be deleted by derived classes. More...
 

Detailed Description

Definition at line 142 of file net.h.

Constructor & Destructor Documentation

◆ FuzzedNetEvents()

FuzzedNetEvents::FuzzedNetEvents ( FuzzedDataProvider fdp)
inline

Definition at line 145 of file net.h.

Member Function Documentation

◆ FinalizeNode()

virtual void FuzzedNetEvents::FinalizeNode ( const CNode node)
inlineoverridevirtual

Handle removal of a peer (clear state)

Implements NetEventsInterface.

Definition at line 149 of file net.h.

◆ HasAllDesirableServiceFlags()

virtual bool FuzzedNetEvents::HasAllDesirableServiceFlags ( ServiceFlags  services) const
inlineoverridevirtual

Callback to determine whether the given set of service flags are sufficient for a peer to be "relevant".

Implements NetEventsInterface.

Definition at line 151 of file net.h.

Here is the call graph for this function:

◆ InitializeNode()

virtual void FuzzedNetEvents::InitializeNode ( const CNode node,
ServiceFlags  our_services 
)
inlineoverridevirtual

Initialize a peer (setup state)

Implements NetEventsInterface.

Definition at line 147 of file net.h.

◆ ProcessMessages()

virtual bool FuzzedNetEvents::ProcessMessages ( CNode pnode,
std::atomic< bool > &  interrupt 
)
inlineoverridevirtual

Process protocol messages received from a given node.

Parameters
[in]pnodeThe node which we have received messages from.
[in]interruptInterrupt condition for processing threads
Returns
True if there is more work to be done

Implements NetEventsInterface.

Definition at line 153 of file net.h.

Here is the call graph for this function:

◆ SendMessages()

virtual bool FuzzedNetEvents::SendMessages ( CNode pnode)
inlineoverridevirtual

Send queued protocol messages to a given node.

Parameters
[in]pnodeThe node which we are sending messages to.
Returns
True if there is more work to be done

Implements NetEventsInterface.

Definition at line 155 of file net.h.

Here is the call graph for this function:

Member Data Documentation

◆ m_fdp

FuzzedDataProvider& FuzzedNetEvents::m_fdp
private

Definition at line 158 of file net.h.


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