Skip to content

Commit f8be956

Browse files
committed
refactor: rename second BuildNewListFromBlock variant to RebuildListFromBlock
Rationale: - Short and clear - The "rebuild" prefix makes it obvious you're starting from an existing list - Distinguishes it well from BuildNewListFromBlock (which builds from database)
1 parent f3ee1d7 commit f8be956

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/evo/specialtxman.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ bool CSpecialTxProcessor::BuildNewListFromBlock(const CBlock& block, gsl::not_nu
177177
{
178178
AssertLockHeld(cs_main);
179179
CDeterministicMNList oldList = m_dmnman.GetListForBlock(pindexPrev);
180-
return BuildNewListFromBlock(block, pindexPrev, oldList, view, debugLogs, state, mnListRet);
180+
return RebuildListFromBlock(block, pindexPrev, oldList, view, debugLogs, state, mnListRet);
181181
}
182182

183-
bool CSpecialTxProcessor::BuildNewListFromBlock(const CBlock& block, gsl::not_null<const CBlockIndex*> pindexPrev,
183+
bool CSpecialTxProcessor::RebuildListFromBlock(const CBlock& block, gsl::not_null<const CBlockIndex*> pindexPrev,
184184
const CDeterministicMNList& prevList, const CCoinsViewCache& view,
185185
bool debugLogs, BlockValidationState& state,
186186
CDeterministicMNList& mnListRet)

src/evo/specialtxman.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CSpecialTxProcessor
8181

8282
// Variant that takes an explicit starting list instead of loading from GetListForBlock
8383
// Used for rebuilding diffs from trusted snapshots
84-
bool BuildNewListFromBlock(const CBlock& block, gsl::not_null<const CBlockIndex*> pindexPrev,
84+
bool RebuildListFromBlock(const CBlock& block, gsl::not_null<const CBlockIndex*> pindexPrev,
8585
const CDeterministicMNList& prevList, const CCoinsViewCache& view, bool debugLogs,
8686
BlockValidationState& state, CDeterministicMNList& mnListRet)
8787
EXCLUSIVE_LOCKS_REQUIRED(cs_main);

src/rpc/evo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ static UniValue evodb_verify_or_repair_impl(const JSONRPCRequest& request, bool
18081808
const CDeterministicMNList& prevList, const CCoinsViewCache& view,
18091809
bool debugLogs, BlockValidationState& state,
18101810
CDeterministicMNList& mnListRet) NO_THREAD_SAFETY_ANALYSIS -> bool {
1811-
return chain_helper.special_tx->BuildNewListFromBlock(block, pindexPrev, prevList, view, debugLogs, state, mnListRet);
1811+
return chain_helper.special_tx->RebuildListFromBlock(block, pindexPrev, prevList, view, debugLogs, state, mnListRet);
18121812
};
18131813

18141814
// Call the dmnman method to do the work

0 commit comments

Comments
 (0)