mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
Trace filter 6 (#1921)
* Improvements to stage1 in download.v2 * Stop timer earlier * Stop timer earlier * Print apends * Fix traceCursor Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
This commit is contained in:
parent
47d22773b9
commit
ddcf271ca5
@ -280,14 +280,21 @@ func SpawnExecuteBlocksStage(s *StageState, tx ethdb.RwTx, toBlock uint64, quit
|
||||
if err = s.Update(tx, stageProgress); err != nil {
|
||||
return err
|
||||
}
|
||||
if traceCursor != nil {
|
||||
traceCursor.Close()
|
||||
}
|
||||
if err = tx.Commit(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tx, err = cfg.db.BeginRw(context.Background())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if cfg.writeCallTraces {
|
||||
if traceCursor, err = tx.RwCursorDupSort(dbutils.CallTraceSet); err != nil {
|
||||
return fmt.Errorf("%s: failed to create cursor for call traces: %v", logPrefix, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
batch = ethdb.NewBatch(tx)
|
||||
}
|
||||
@ -312,6 +319,9 @@ func SpawnExecuteBlocksStage(s *StageState, tx ethdb.RwTx, toBlock uint64, quit
|
||||
}
|
||||
}
|
||||
if !useExternalTx {
|
||||
if traceCursor != nil {
|
||||
traceCursor.Close()
|
||||
}
|
||||
if err := tx.Commit(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user