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 committed 2025-09-04 15:57:24 +02:00
1 parent 2562fe1b2b
commit fab842b324
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -265,7 +265,7 @@ bool CoinStatsIndex::CustomRemove(const interfaces::BlockInfo& block)
if (!m_db->WriteBatch(batch)) return false; if (!m_db->WriteBatch(batch)) return false;
if (!ReverseBlock(block)) { if (!RevertBlock(block)) {
return false; // failure cause logged internally return false; // failure cause logged internally
} }
@@ -381,8 +381,8 @@ interfaces::Chain::NotifyOptions CoinStatsIndex::CustomOptions()
return options; return options;
} }
// Reverse a single block as part of a reorg // Revert a single block as part of a reorg
bool CoinStatsIndex::ReverseBlock(const interfaces::BlockInfo& block) bool CoinStatsIndex::RevertBlock(const interfaces::BlockInfo& block)
{ {
std::pair<uint256, DBVal> read_out; std::pair<uint256, DBVal> read_out;
+1 -1
View File
@@ -38,7 +38,7 @@ private:
CAmount m_total_unspendables_scripts{0}; CAmount m_total_unspendables_scripts{0};
CAmount m_total_unspendables_unclaimed_rewards{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; } bool AllowPrune() const override { return true; }