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