core: fix indexer unit test

This commit is contained in:
rjl493456442 2020-01-06 11:43:03 +08:00
parent 3bb6815fc1
commit c328a51d27

View file

@ -203,7 +203,7 @@ func (b *testChainIndexBackend) assertBlocks(headNum, failNum uint64) (uint64, b
}
func (b *testChainIndexBackend) reorg(headNum uint64) uint64 {
firstChanged := headNum / b.indexer.sectionSize
firstChanged := (headNum + 1) / b.indexer.sectionSize
if firstChanged < b.stored {
b.stored = firstChanged
}