mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge #21567: docs: fix various misleading comments
4eca20d6f7[doc] correct comment about ATMPW (glozow)8fa74aeb5b[doc] correct comment in chainparams (glozow)2f8272c2a4[doc] GetBestBlock() doesn't do nothing (gzhao408) Pull request description: Came across a few misleading comments, wanted to fix them ACKs for top commit: jnewbery: ACK4eca20d6f7MarcoFalke: ACK4eca20d6f7laanwj: Code review ACK4eca20d6f7Tree-SHA512: 5bef1f1e7703f304128cf0eb8945e139e031580c99062bbbe15bf4db8443c2ba5a8c65844833132e6646c8980c678fc1d2ab0c63e17105585d583570ee350fd0
This commit is contained in:
commit
66daf4cb3b
3 changed files with 11 additions and 12 deletions
|
|
@ -690,7 +690,8 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
|
|||
}
|
||||
}
|
||||
|
||||
// Bring the best block into scope
|
||||
// This is const, but calls into the back end CoinsViews. The CCoinsViewDB at the bottom of the
|
||||
// hierarchy brings the best block into scope. See CCoinsViewDB::GetBestBlock().
|
||||
m_view.GetBestBlock();
|
||||
|
||||
// we have all inputs cached now, so switch back to dummy (to protect
|
||||
|
|
@ -1099,9 +1100,9 @@ static MempoolAcceptResult AcceptToMemoryPoolWithTime(const CChainParams& chainp
|
|||
assert(std::addressof(::ChainstateActive()) == std::addressof(active_chainstate));
|
||||
const MempoolAcceptResult result = MemPoolAccept(pool, active_chainstate).AcceptSingleTransaction(tx, args);
|
||||
if (result.m_result_type != MempoolAcceptResult::ResultType::VALID) {
|
||||
// Remove coins that were not present in the coins cache before calling ATMPW;
|
||||
// this is to prevent memory DoS in case we receive a large number of
|
||||
// invalid transactions that attempt to overrun the in-memory coins cache
|
||||
// Remove coins that were not present in the coins cache before calling
|
||||
// AcceptSingleTransaction(); this is to prevent memory DoS in case we receive a large
|
||||
// number of invalid transactions that attempt to overrun the in-memory coins cache
|
||||
// (`CCoinsViewCache::cacheCoins`).
|
||||
|
||||
for (const COutPoint& hashTx : coins_to_uncache)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue