PIVX Core  5.6.99
P2P Digital Currency
Classes | Functions | Variables
DoS_tests.cpp File Reference
#include "test/test_pivx.h"
#include "arith_uint256.h"
#include "keystore.h"
#include "net_processing.h"
#include "net.h"
#include "pubkey.h"
#include "pow.h"
#include "script/sign.h"
#include "serialize.h"
#include "util/system.h"
#include "validation.h"
#include <stdint.h>
#include <boost/test/unit_test.hpp>
Include dependency graph for DoS_tests.cpp:

Go to the source code of this file.

Classes

struct  COrphanTx
 

Functions

bool AddOrphanTx (const CTransactionRef &tx, NodeId peer)
 
void EraseOrphansFor (NodeId peer)
 For random eviction. More...
 
unsigned int LimitOrphanTxSize (unsigned int nMaxOrphans)
 
std::map< uint256, COrphanTx > mapOrphanTransactions GUARDED_BY (g_cs_orphans)
 
CService ip (uint32_t i)
 
void misbehave (NodeId id, int value)
 
 BOOST_AUTO_TEST_CASE (DoS_banning)
 
 BOOST_AUTO_TEST_CASE (DoS_banscore)
 
 BOOST_AUTO_TEST_CASE (DoS_bantime)
 
CTransactionRef RandomOrphan ()
 
 BOOST_AUTO_TEST_CASE (DoS_mapOrphans)
 

Variables

RecursiveMutex g_cs_orphans
 

Function Documentation

◆ AddOrphanTx()

bool AddOrphanTx ( const CTransactionRef tx,
NodeId  peer 
)

Definition at line 517 of file net_processing.cpp.

◆ BOOST_AUTO_TEST_CASE() [1/4]

BOOST_AUTO_TEST_CASE ( DoS_banning  )

Definition at line 55 of file DoS_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/4]

BOOST_AUTO_TEST_CASE ( DoS_banscore  )

Definition at line 95 of file DoS_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( DoS_bantime  )

Definition at line 128 of file DoS_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( DoS_mapOrphans  )

Definition at line 175 of file DoS_tests.cpp.

Here is the call graph for this function:

◆ EraseOrphansFor()

void EraseOrphansFor ( NodeId  peer)

For random eviction.

Definition at line 578 of file net_processing.cpp.

Here is the caller graph for this function:

◆ GUARDED_BY()

std::map<uint256, COrphanTx> mapOrphanTransactions GUARDED_BY ( g_cs_orphans  )

◆ ip()

CService ip ( uint32_t  i)

Definition at line 39 of file DoS_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LimitOrphanTxSize()

unsigned int LimitOrphanTxSize ( unsigned int  nMaxOrphans)

Definition at line 593 of file net_processing.cpp.

Here is the call graph for this function:

◆ misbehave()

void misbehave ( NodeId  id,
int  value 
)

Definition at line 50 of file DoS_tests.cpp.

Here is the call graph for this function:

◆ RandomOrphan()

CTransactionRef RandomOrphan ( )

Definition at line 157 of file DoS_tests.cpp.

Variable Documentation

◆ g_cs_orphans

RecursiveMutex g_cs_orphans
extern

Definition at line 59 of file net_processing.cpp.