From c328a51d27279f09e669826ca7be09c3606d0b82 Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Mon, 6 Jan 2020 11:43:03 +0800 Subject: [PATCH] core: fix indexer unit test --- core/chain_indexer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/chain_indexer_test.go b/core/chain_indexer_test.go index abf5b3cc1400..ff7548e7bd19 100644 --- a/core/chain_indexer_test.go +++ b/core/chain_indexer_test.go @@ -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 }