fix tests

This commit is contained in:
Sina Mahmoodi 2025-05-01 16:06:48 +02:00
parent ace9d07a1f
commit 91923a6bc4
2 changed files with 2 additions and 2 deletions

View file

@ -440,7 +440,7 @@ func TestTxIndexerReport(t *testing.T) {
if c.tail != nil {
rawdb.WriteTxIndexTail(db, *c.tail)
}
p := indexer.report(c.head)
p := indexer.report(c.head, c.tail)
if p.Indexed != c.expIndexed {
t.Fatalf("Unexpected indexed: %d, expected: %d", p.Indexed, c.expIndexed)
}

View file

@ -119,7 +119,7 @@ func newTestBackend(config *node.Config) (*node.Node, []*types.Block, error) {
}
// Ensure the tx indexing is fully generated
for ; ; time.Sleep(time.Millisecond * 100) {
progress, err := ethservice.BlockChain().TxIndexProgress()
progress, err := ethservice.BlockChain().TxIndexProgress(context.Background())
if err == nil && progress.Done() {
break
}