0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-09 10:43:19 -05:00

[doc] GetBestBlock() doesn't do nothing

This has tripped people up multiple times because it looks like
GetBestBlock is a const function returning the value of hashBlock.
This commit is contained in:
gzhao408 2021-02-01 15:24:30 -08:00 committed by glozow
parent b14462083f
commit 2f8272c2a4

View file

@ -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