Changeset View
Changeset View
Standalone View
Standalone View
src/test/denialofservice_tests.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
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 RecursiveMutex g_cs_orphans; | |||||
extern std::map<uint256, COrphanTx> | extern std::map<uint256, COrphanTx> | ||||
mapOrphanTransactions GUARDED_BY(g_cs_orphans); | mapOrphanTransactions GUARDED_BY(g_cs_orphans); | ||||
static CService ip(uint32_t i) { | static CService ip(uint32_t i) { | ||||
struct in_addr s; | struct in_addr s; | ||||
s.s_addr = i; | s.s_addr = i; | ||||
return CService(CNetAddr(s), Params().GetDefaultPort()); | return CService(CNetAddr(s), Params().GetDefaultPort()); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 428 Lines • Show Last 20 Lines |