mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
fix tests
This commit is contained in:
parent
ace9d07a1f
commit
91923a6bc4
2 changed files with 2 additions and 2 deletions
|
|
@ -440,7 +440,7 @@ func TestTxIndexerReport(t *testing.T) {
|
||||||
if c.tail != nil {
|
if c.tail != nil {
|
||||||
rawdb.WriteTxIndexTail(db, *c.tail)
|
rawdb.WriteTxIndexTail(db, *c.tail)
|
||||||
}
|
}
|
||||||
p := indexer.report(c.head)
|
p := indexer.report(c.head, c.tail)
|
||||||
if p.Indexed != c.expIndexed {
|
if p.Indexed != c.expIndexed {
|
||||||
t.Fatalf("Unexpected indexed: %d, expected: %d", p.Indexed, c.expIndexed)
|
t.Fatalf("Unexpected indexed: %d, expected: %d", p.Indexed, c.expIndexed)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ func newTestBackend(config *node.Config) (*node.Node, []*types.Block, error) {
|
||||||
}
|
}
|
||||||
// Ensure the tx indexing is fully generated
|
// Ensure the tx indexing is fully generated
|
||||||
for ; ; time.Sleep(time.Millisecond * 100) {
|
for ; ; time.Sleep(time.Millisecond * 100) {
|
||||||
progress, err := ethservice.BlockChain().TxIndexProgress()
|
progress, err := ethservice.BlockChain().TxIndexProgress(context.Background())
|
||||||
if err == nil && progress.Done() {
|
if err == nil && progress.Done() {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue