From fab842b3248744fb0030486f64d3febe815f8377 Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Fri, 15 Aug 2025 17:43:23 +0200 Subject: [PATCH] index, refactor: Rename ReverseBlock to RevertBlock Semantically this is the correct name for what the function is doing. --- src/index/coinstatsindex.cpp | 6 +++--- src/index/coinstatsindex.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index/coinstatsindex.cpp b/src/index/coinstatsindex.cpp index 96693f7f48a..ce3f566d9e7 100644 --- a/src/index/coinstatsindex.cpp +++ b/src/index/coinstatsindex.cpp @@ -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 read_out; diff --git a/src/index/coinstatsindex.h b/src/index/coinstatsindex.h index 6e2743688ad..f2e95b449e4 100644 --- a/src/index/coinstatsindex.h +++ b/src/index/coinstatsindex.h @@ -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; }