43#include <boost/chrono.hpp>
44#include <boost/date_time/posix_time/posix_time.hpp>
45#include <boost/thread/thread.hpp>
56#undef ELECTRONEUM_DEFAULT_LOG_CATEGORY
57#define ELECTRONEUM_DEFAULT_LOG_CATEGORY "net.cn"
84 const double size_min = 500;
91 avg = std::max( size_min , avg);
107 MDEBUG(
"Packet size: " << packet_size);
130 long int ms = (
long int)(delay * 1000);
131 MDEBUG(
"Sleeping for " << ms <<
" ms before packet_size="<<packet_size);
132 boost::this_thread::sleep(boost::posix_time::milliseconds( ms ) );
virtual double get_avg_block_size()=0
virtual double estimate_one_block_size() noexcept
void handler_response_blocks_now(size_t packet_size)
virtual ~cryptonote_protocol_handler_base()
void handler_request_blocks_history(std::list< crypto::hash > &ids)
cryptonote_protocol_handler_base()
static i_network_throttle & get_global_throttle_out()
ditto ; use lock ... use m_lock_get_global_throttle_out obviously
static boost::mutex m_lock_get_global_throttle_out
This is the orginal cryptonote protocol network-events handler, modified by us.
Holds cryptonote related classes and helpers.
interface for throttling of connection (count and rate-limit speed etc)
#define CRITICAL_REGION_LOCAL(x)