mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge b1c8ea45c9 into merged_master (Bitcoin PR bitcoin/bitcoin#25683)
This commit is contained in:
commit
35cc1e213b
4 changed files with 5 additions and 10 deletions
|
|
@ -3692,10 +3692,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||
|
||||
// DoS prevention: do not allow m_orphanage to grow unbounded (see CVE-2012-3789)
|
||||
unsigned int nMaxOrphanTx = (unsigned int)std::max((int64_t)0, gArgs.GetIntArg("-maxorphantx", DEFAULT_MAX_ORPHAN_TRANSACTIONS));
|
||||
unsigned int nEvicted = m_orphanage.LimitOrphans(nMaxOrphanTx);
|
||||
if (nEvicted > 0) {
|
||||
LogPrint(BCLog::MEMPOOL, "orphanage overflow, removed %u tx\n", nEvicted);
|
||||
}
|
||||
m_orphanage.LimitOrphans(nMaxOrphanTx);
|
||||
} else {
|
||||
LogPrint(BCLog::MEMPOOL, "not keeping orphan with rejected parents %s\n",tx.GetHash().ToString());
|
||||
// We will continue to reject this tx since it has rejected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue