mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
[net processing] Move -maxorphantx to PeerManager::Options
This commit is contained in:
@@ -4238,8 +4238,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
m_txrequest.ForgetTxHash(tx.GetWitnessHash());
|
||||
|
||||
// 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));
|
||||
m_orphanage.LimitOrphans(nMaxOrphanTx);
|
||||
m_orphanage.LimitOrphans(m_opts.max_orphan_txs);
|
||||
} 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
|
||||
|
||||
Reference in New Issue
Block a user