Changeset View
Changeset View
Standalone View
Standalone View
src/txorphanage.h
Show All 17 Lines | |||||
struct COrphanTx { | struct COrphanTx { | ||||
// When modifying, adapt the copy of this definition in tests/DoS_tests. | // When modifying, adapt the copy of this definition in tests/DoS_tests. | ||||
CTransactionRef tx; | CTransactionRef tx; | ||||
NodeId fromPeer; | NodeId fromPeer; | ||||
int64_t nTimeExpire; | int64_t nTimeExpire; | ||||
size_t list_pos; | size_t list_pos; | ||||
}; | }; | ||||
int EraseOrphanTx(TxId id) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); | int EraseOrphanTx(const TxId &txid) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); | ||||
void EraseOrphansFor(NodeId peer); | void EraseOrphansFor(NodeId peer); | ||||
unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans); | unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans); | ||||
/** | /** | ||||
* Map from txid to orphan transaction record. Limited by | * Map from txid to orphan transaction record. Limited by | ||||
* -maxorphantx/DEFAULT_MAX_ORPHAN_TRANSACTIONS | * -maxorphantx/DEFAULT_MAX_ORPHAN_TRANSACTIONS | ||||
*/ | */ | ||||
extern std::map<TxId, COrphanTx> mapOrphanTransactions GUARDED_BY(g_cs_orphans); | extern std::map<TxId, COrphanTx> mapOrphanTransactions GUARDED_BY(g_cs_orphans); | ||||
Show All 20 Lines |