don't check tail

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2023-08-17 16:15:24 +08:00
parent 4273f24875
commit 60b2862a6b

View file

@ -2398,10 +2398,9 @@ func (bc *BlockChain) maintainTxIndex() {
// useful in these scenarios that chain has no progress and indexer
// is never triggered.
head := rawdb.ReadHeadBlock(bc.db)
tail := rawdb.ReadTxIndexTail(bc.db)
if head != nil && tail != nil {
if head != nil {
done = make(chan struct{})
bc.indexBlocks(tail, head.NumberU64(), done)
go bc.indexBlocks(rawdb.ReadTxIndexTail(bc.db), head.NumberU64(), done)
}
for {