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 <hao.xu@linux.dev>
This commit is contained in:
Hao Xu
2025-07-04 23:46:18 +08:00
parent 75ed673193
commit acf50233cd

View File

@@ -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;