scripted-diff: normalize CCoinsView naming

Standardize coins view naming with a mechanical rename pass.
This keeps subsequent commits focused on the interface and behavioral changes.

Co-authored-by: Andrew Toth <andrewstoth@gmail.com>

-BEGIN VERIFY SCRIPT-
git grep -qE '\bin_base\b|\bin_view\b|\bin_block_hash\b|\bblock_hash\b' -- src/coins.cpp src/coins.h src/txdb.cpp src/txdb.h src/test/coins_tests.cpp && { echo "Error: target names already exist in scoped files"; exit 1; }

perl -pi -e '
  s/\bbaseIn\b/in_base/g;
  s/\bhashBlockIn\b/in_block_hash/g;
  s/\bhashBlock\b/block_hash/g;
  s/\bviewIn\b/in_view/g;
  ' src/coins.cpp src/coins.h src/txdb.cpp src/txdb.h src/test/coins_tests.cpp
-END VERIFY SCRIPT-
This commit is contained in:
Lőrinc
2026-02-15 15:24:53 +01:00
parent 06172ef0d5
commit 38a99f3344
5 changed files with 35 additions and 35 deletions

View File

@@ -55,7 +55,7 @@ public:
uint256 GetBestBlock() const override { return hashBestBlock_; }
void BatchWrite(CoinsViewCacheCursor& cursor, const uint256& hashBlock) override
void BatchWrite(CoinsViewCacheCursor& cursor, const uint256& block_hash) override
{
for (auto it{cursor.Begin()}; it != cursor.End(); it = cursor.NextAndMaybeErase(*it)){
if (it->second.IsDirty()) {
@@ -67,8 +67,8 @@ public:
}
}
}
if (!hashBlock.IsNull())
hashBestBlock_ = hashBlock;
if (!block_hash.IsNull())
hashBestBlock_ = block_hash;
}
};
@@ -910,7 +910,7 @@ void TestFlushBehavior(
for (auto i = all_caches.rbegin(); i != all_caches.rend(); ++i) {
auto& cache = *i;
cache->SanityCheck();
// hashBlock must be filled before flushing to disk; value is
// block_hash must be filled before flushing to disk; value is
// unimportant here. This is normally done during connect/disconnect block.
cache->SetBestBlock(m_rng.rand256());
erase ? cache->Flush() : cache->Sync();