index, refactor: Rename ReverseBlock to RevertBlock

Semantically this is the correct name for what the function is doing.
This commit is contained in:
Fabian Jahr
2025-08-15 17:43:23 +02:00
parent 2562fe1b2b
commit fab842b324
2 changed files with 4 additions and 4 deletions

View File

@@ -265,7 +265,7 @@ bool CoinStatsIndex::CustomRemove(const interfaces::BlockInfo& block)
if (!m_db->WriteBatch(batch)) return false;
if (!ReverseBlock(block)) {
if (!RevertBlock(block)) {
return false; // failure cause logged internally
}
@@ -381,8 +381,8 @@ interfaces::Chain::NotifyOptions CoinStatsIndex::CustomOptions()
return options;
}
// Reverse a single block as part of a reorg
bool CoinStatsIndex::ReverseBlock(const interfaces::BlockInfo& block)
// Revert a single block as part of a reorg
bool CoinStatsIndex::RevertBlock(const interfaces::BlockInfo& block)
{
std::pair<uint256, DBVal> read_out;

View File

@@ -38,7 +38,7 @@ private:
CAmount m_total_unspendables_scripts{0};
CAmount m_total_unspendables_unclaimed_rewards{0};
[[nodiscard]] bool ReverseBlock(const interfaces::BlockInfo& block);
[[nodiscard]] bool RevertBlock(const interfaces::BlockInfo& block);
bool AllowPrune() const override { return true; }