diff --git a/core/network/impl/protocols/grandpa_protocol.hpp b/core/network/impl/protocols/grandpa_protocol.hpp index 6684ffdbc9..f054cf168b 100644 --- a/core/network/impl/protocols/grandpa_protocol.hpp +++ b/core/network/impl/protocols/grandpa_protocol.hpp @@ -10,9 +10,9 @@ #include +#include #include #include -#include #include "application/app_configuration.hpp" #include "consensus/grandpa/grandpa_observer.hpp" @@ -50,8 +50,7 @@ namespace kagome::network { const OwnPeerInfo &own_info, std::shared_ptr stream_engine, std::shared_ptr peer_manager, - std::shared_ptr scheduler - ); + std::shared_ptr scheduler); const Protocol &protocol() const override { return protocol_; @@ -97,6 +96,9 @@ namespace kagome::network { const int &msg, std::function>)> &&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);