6 #ifndef KAGOME_NETWORK_REPUTATIONREPOSITORYIMPL 7 #define KAGOME_NETWORK_REPUTATIONREPOSITORYIMPL 12 #include <unordered_map> 14 #include <libp2p/basic/scheduler.hpp> 22 public std::enable_shared_from_this<ReputationRepositoryImpl> {
25 std::shared_ptr<libp2p::basic::Scheduler> scheduler);
33 std::chrono::seconds duration)
override;
48 #endif // KAGOME_NETWORK_REPUTATIONREPOSITORYIMPL std::shared_ptr< libp2p::basic::Scheduler > scheduler_
Reputation reputation(const PeerId &peer_id) const override
Current peer reputation.
libp2p::peer::PeerId PeerId
Reputation changeForATime(const PeerId &peer_id, ReputationChange diff, std::chrono::seconds duration) override
std::shared_ptr< soralog::Logger > Logger
Reputation change(const PeerId &peer_id, ReputationChange diff) override
libp2p::basic::Scheduler::Handle tick_handler_
std::unordered_map< PeerId, Reputation > reputation_table_
ReputationRepositoryImpl(std::shared_ptr< libp2p::basic::Scheduler > scheduler)