Electroneum
Namespaces | Macros
cryptonote_protocol_handler.inl File Reference

This is the orginal cryptonote protocol network-events handler, modified by us. More...

#include <boost/interprocess/detail/atomic.hpp>
#include <list>
#include <ctime>
#include "cryptonote_basic/cryptonote_format_utils.h"
#include "profile_tools.h"
#include "net/network_throttle-detail.hpp"
#include "common/pruning.h"
#include "cryptonote_basic/validators.h"
Include dependency graph for cryptonote_protocol_handler.inl:
This graph shows which files directly or indirectly include this file:

Namespaces

 cryptonote
 Holds cryptonote related classes and helpers.
 

Macros

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "net.cn"
 
#define MLOG_P2P_MESSAGE(x)   MCINFO("net.p2p.msg", context << x)
 
#define MLOGIF_P2P_MESSAGE(init, test, x)
 
#define MLOG_PEER_STATE(x)    MCINFO(ELECTRONEUM_DEFAULT_LOG_CATEGORY, context << "[" << epee::string_tools::to_string_hex(context.m_pruning_seed) << "] state: " << x << " in state " << cryptonote::get_protocol_state_string(context.m_state))
 
#define BLOCK_QUEUE_NSPANS_THRESHOLD   10
 
#define BLOCK_QUEUE_SIZE_THRESHOLD   (100*1024*1024)
 
#define BLOCK_QUEUE_FORCE_DOWNLOAD_NEAR_BLOCKS   1000
 
#define REQUEST_NEXT_SCHEDULED_SPAN_THRESHOLD_STANDBY   (5 * 1000000)
 
#define REQUEST_NEXT_SCHEDULED_SPAN_THRESHOLD   (30 * 1000000)
 
#define IDLE_PEER_KICK_TIME   (600 * 1000000)
 
#define PASSIVE_PEER_KICK_TIME   (60 * 1000000)
 
#define DROP_ON_SYNC_WEDGE_THRESHOLD   (30 * 1000000000ull)
 
#define LAST_ACTIVITY_STALL_THRESHOLD   (2.0f)
 

Detailed Description

This is the orginal cryptonote protocol network-events handler, modified by us.

Author
rfree (current maintainer/user in electroneum.cc project - most of code is from CryptoNote)

Macro Definition Documentation

◆ BLOCK_QUEUE_FORCE_DOWNLOAD_NEAR_BLOCKS

#define BLOCK_QUEUE_FORCE_DOWNLOAD_NEAR_BLOCKS   1000

◆ BLOCK_QUEUE_NSPANS_THRESHOLD

#define BLOCK_QUEUE_NSPANS_THRESHOLD   10

◆ BLOCK_QUEUE_SIZE_THRESHOLD

#define BLOCK_QUEUE_SIZE_THRESHOLD   (100*1024*1024)

◆ DROP_ON_SYNC_WEDGE_THRESHOLD

#define DROP_ON_SYNC_WEDGE_THRESHOLD   (30 * 1000000000ull)

◆ ELECTRONEUM_DEFAULT_LOG_CATEGORY

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "net.cn"

◆ IDLE_PEER_KICK_TIME

#define IDLE_PEER_KICK_TIME   (600 * 1000000)

◆ LAST_ACTIVITY_STALL_THRESHOLD

#define LAST_ACTIVITY_STALL_THRESHOLD   (2.0f)

◆ MLOG_P2P_MESSAGE

#define MLOG_P2P_MESSAGE (   x)    MCINFO("net.p2p.msg", context << x)

◆ MLOG_PEER_STATE

#define MLOG_PEER_STATE (   x)     MCINFO(ELECTRONEUM_DEFAULT_LOG_CATEGORY, context << "[" << epee::string_tools::to_string_hex(context.m_pruning_seed) << "] state: " << x << " in state " << cryptonote::get_protocol_state_string(context.m_state))

◆ MLOGIF_P2P_MESSAGE

#define MLOGIF_P2P_MESSAGE (   init,
  test,
 
)
Value:
do { \
const auto level = el::Level::Info; \
const char *cat = "net.p2p.msg"; \
if (ELPP->vRegistry()->allowed(level, cat)) { \
init; \
if (test) \
el::base::Writer(level, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::NormalLog).construct(cat) << x; \
} \
} while(0)
Definition: test.py:1

◆ PASSIVE_PEER_KICK_TIME

#define PASSIVE_PEER_KICK_TIME   (60 * 1000000)

◆ REQUEST_NEXT_SCHEDULED_SPAN_THRESHOLD

#define REQUEST_NEXT_SCHEDULED_SPAN_THRESHOLD   (30 * 1000000)

◆ REQUEST_NEXT_SCHEDULED_SPAN_THRESHOLD_STANDBY

#define REQUEST_NEXT_SCHEDULED_SPAN_THRESHOLD_STANDBY   (5 * 1000000)