瀏覽代碼

core: fix chain indexer unit test (#20506)

gary rong 5 年之前
父節點
當前提交
b88b4632c2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/chain_indexer_test.go

+ 1 - 1
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
 	}