Changeset View
Changeset View
Standalone View
Standalone View
src/test/denialofservice_tests.cpp
Show All 20 Lines | |||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
#include <cstdint> | #include <cstdint> | ||||
// Tests these internal-to-net_processing.cpp methods: | // Tests these internal-to-net_processing.cpp methods: | ||||
extern bool AddOrphanTx(const CTransactionRef &tx, NodeId peer); | extern bool AddOrphanTx(const CTransactionRef &tx, NodeId peer); | ||||
extern void EraseOrphansFor(NodeId peer); | extern void EraseOrphansFor(NodeId peer); | ||||
extern unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans); | extern unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans); | ||||
struct COrphanTx { | struct COrphanTx { | ||||
CTransactionRef tx; | CTransactionRef tx; | ||||
NodeId fromPeer; | NodeId fromPeer; | ||||
int64_t nTimeExpire; | int64_t nTimeExpire; | ||||
}; | }; | ||||
extern std::map<uint256, COrphanTx> mapOrphanTransactions; | extern std::map<uint256, COrphanTx> mapOrphanTransactions; | ||||
static CService ip(uint32_t i) { | static CService ip(uint32_t i) { | ||||
▲ Show 20 Lines • Show All 394 Lines • Show Last 20 Lines |