0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-03 09:56:38 -05:00

Follow coding style for named arguments

This commit is contained in:
Pieter Wuille 2023-01-30 13:13:20 -05:00
parent bb00357add
commit 98db35c2f8

View file

@ -249,7 +249,7 @@ bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlockIn
}
bool CCoinsViewCache::Flush() {
bool fOk = base->BatchWrite(cacheCoins, hashBlock, /*erase=*/ true);
bool fOk = base->BatchWrite(cacheCoins, hashBlock, /*erase=*/true);
cacheCoins.clear();
cachedCoinsUsage = 0;
return fOk;
@ -257,7 +257,7 @@ bool CCoinsViewCache::Flush() {
bool CCoinsViewCache::Sync()
{
bool fOk = base->BatchWrite(cacheCoins, hashBlock, /*erase=*/ false);
bool fOk = base->BatchWrite(cacheCoins, hashBlock, /*erase=*/false);
// Instead of clearing `cacheCoins` as we would in Flush(), just clear the
// FRESH/DIRTY flags of any coin that isn't spent.
for (auto it = cacheCoins.begin(); it != cacheCoins.end(); ) {