#include <reputation_repository_impl.hpp>
|
using | PeerId = libp2p::peer::PeerId |
|
kagome::network::ReputationRepositoryImpl::ReputationRepositoryImpl |
( |
std::shared_ptr< libp2p::basic::Scheduler > |
scheduler | ) |
|
Change peer reputation by arbitrary amount of points for a specified amount of time
- Parameters
-
peer_id | - peer identifier |
difff | - reputation increment or decrement |
duration | - amount of time to change peer reputation for |
- Returns
- - resulting peer reputation
Implements kagome::network::ReputationRepository.
Definition at line 44 of file reputation_repository_impl.cpp.
Reputation kagome::network::ReputationRepositoryImpl::reputation |
( |
const PeerId & |
peer_id | ) |
const |
|
overridevirtual |
void kagome::network::ReputationRepositoryImpl::tick |
( |
| ) |
|
|
private |
log::Logger kagome::network::ReputationRepositoryImpl::log_ |
|
private |
std::unordered_map<PeerId, Reputation> kagome::network::ReputationRepositoryImpl::reputation_table_ |
|
private |
std::shared_ptr<libp2p::basic::Scheduler> kagome::network::ReputationRepositoryImpl::scheduler_ |
|
private |
libp2p::basic::Scheduler::Handle kagome::network::ReputationRepositoryImpl::tick_handler_ |
|
private |
The documentation for this class was generated from the following files: