Commit b88b4632 authored by gary rong's avatar gary rong Committed by Péter Szilágyi

core: fix chain indexer unit test (#20506)

parent 4c8fcd93
...@@ -203,7 +203,7 @@ func (b *testChainIndexBackend) assertBlocks(headNum, failNum uint64) (uint64, b ...@@ -203,7 +203,7 @@ func (b *testChainIndexBackend) assertBlocks(headNum, failNum uint64) (uint64, b
} }
func (b *testChainIndexBackend) reorg(headNum uint64) uint64 { func (b *testChainIndexBackend) reorg(headNum uint64) uint64 {
firstChanged := headNum / b.indexer.sectionSize firstChanged := (headNum + 1) / b.indexer.sectionSize
if firstChanged < b.stored { if firstChanged < b.stored {
b.stored = firstChanged b.stored = firstChanged
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment