Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
dev::p2p::ReputationManager Class Reference

#include <Host.h>

Public Member Functions

 ReputationManager ()
 
void noteRude (SessionFace const &_s, std::string const &_sub=std::string())
 
bool isRude (SessionFace const &_s, std::string const &_sub=std::string()) const
 
void setData (SessionFace const &_s, std::string const &_sub, bytes const &_data)
 
bytes data (SessionFace const &_s, std::string const &_subs) const
 

Private Attributes

std::unordered_map< std::pair< p2p::NodeID, std::string >, Reputationm_nodes
 Nodes that were impolite while syncing. We avoid syncing from these if possible. More...
 
SharedMutex x_nodes
 

Detailed Description

Definition at line 93 of file Host.h.

Constructor & Destructor Documentation

ReputationManager::ReputationManager ( )

Definition at line 57 of file Host.cpp.

Member Function Documentation

bytes ReputationManager::data ( SessionFace const &  _s,
std::string const &  _subs 
) const

Definition at line 87 of file Host.cpp.

Here is the call graph for this function:

bool ReputationManager::isRude ( SessionFace const &  _s,
std::string const &  _sub = std::string() 
) const

Definition at line 67 of file Host.cpp.

Here is the call graph for this function:

void ReputationManager::noteRude ( SessionFace const &  _s,
std::string const &  _sub = std::string() 
)

Definition at line 61 of file Host.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ReputationManager::setData ( SessionFace const &  _s,
std::string const &  _sub,
bytes const &  _data 
)

Definition at line 81 of file Host.cpp.

Here is the call graph for this function:

Member Data Documentation

std::unordered_map<std::pair<p2p::NodeID, std::string>, Reputation> dev::p2p::ReputationManager::m_nodes
private

Nodes that were impolite while syncing. We avoid syncing from these if possible.

Definition at line 104 of file Host.h.

SharedMutex dev::p2p::ReputationManager::x_nodes
mutableprivate

Definition at line 105 of file Host.h.


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