Skip to content

Commit

Permalink
fix: review issues
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
  • Loading branch information
xDimon committed Aug 1, 2022
1 parent 28e20dc commit a861af5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/network/impl/protocols/grandpa_protocol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

#include <memory>

#include <libp2p/basic/scheduler.hpp>
#include <libp2p/connection/stream.hpp>
#include <libp2p/host/host.hpp>
#include <libp2p/basic/scheduler.hpp>

#include "application/app_configuration.hpp"
#include "consensus/grandpa/grandpa_observer.hpp"
Expand Down Expand Up @@ -50,8 +50,7 @@ namespace kagome::network {
const OwnPeerInfo &own_info,
std::shared_ptr<StreamEngine> stream_engine,
std::shared_ptr<PeerManager> peer_manager,
std::shared_ptr<libp2p::basic::Scheduler> scheduler
);
std::shared_ptr<libp2p::basic::Scheduler> scheduler);

const Protocol &protocol() const override {
return protocol_;
Expand Down Expand Up @@ -97,6 +96,9 @@ namespace kagome::network {
const int &msg,
std::function<void(outcome::result<std::shared_ptr<Stream>>)> &&cb);

/// Node should send catch-up requests rarely to be polite, because
/// processing of them consume more enough resources.
/// How long replying outgoing catch-up requests must be suppressed
static constexpr std::chrono::milliseconds kRecentnessDuration =
std::chrono::seconds(300);

Expand Down

0 comments on commit a861af5

Please sign in to comment.