From acf50233cdfbb336c87d95d97db90a149e131052 Mon Sep 17 00:00:00 2001 From: Hao Xu Date: Fri, 4 Jul 2025 23:46:18 +0800 Subject: [PATCH] index: fix wrong assert of current_tip == m_best_block_index In BaseIndex::Sync(), pindex in `Rewind(pindex, pindex_next->pprev)` isn't always equal to m_best_block_index since m_best_block_index is updated every SYNC_LOCATOR_WRITE_INTERVAL seconds, during which multiple pindex update could happen. Thus the assert here is wrong. Signed-off-by: Hao Xu --- src/index/base.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index/base.cpp b/src/index/base.cpp index fdd0e0d8af2..dd35f2bd09b 100644 --- a/src/index/base.cpp +++ b/src/index/base.cpp @@ -274,7 +274,6 @@ bool BaseIndex::Commit() bool BaseIndex::Rewind(const CBlockIndex* current_tip, const CBlockIndex* new_tip) { - assert(current_tip == m_best_block_index); assert(current_tip->GetAncestor(new_tip->nHeight) == new_tip); CBlock block;