From f5f6b5cd9c8783aef878a9b4acd2f8adbec8037b Mon Sep 17 00:00:00 2001 From: maskpp Date: Tue, 23 Apr 2024 10:17:29 +0800 Subject: [PATCH] genesis head remaining number sould be zero --- core/txindexer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/txindexer.go b/core/txindexer.go index 70fe5f3322..600e8034d7 100644 --- a/core/txindexer.go +++ b/core/txindexer.go @@ -176,6 +176,9 @@ func (indexer *txIndexer) loop(chain *BlockChain) { // report returns the tx indexing progress. func (indexer *txIndexer) report(head uint64, tail *uint64) TxIndexProgress { + if head == 0 { + return TxIndexProgress{} + } total := indexer.limit if indexer.limit == 0 || total > head { total = head + 1 // genesis included