mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
save
This commit is contained in:
parent
72502e18f0
commit
3b66aa0571
@ -303,8 +303,6 @@ func NewWorkersPool(lock sync.Locker, ctx context.Context, background bool, chai
|
|||||||
w.ResetTx(nil)
|
w.ResetTx(nil)
|
||||||
}
|
}
|
||||||
//applyWorker.ResetTx(nil)
|
//applyWorker.ResetTx(nil)
|
||||||
log.Warn("before rws.Close()")
|
|
||||||
rws.Close()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
applyWorker = NewWorker(lock, ctx, false, chainDb, rs, in, blockReader, chainConfig, genesis, rws, engine)
|
applyWorker = NewWorker(lock, ctx, false, chainDb, rs, in, blockReader, chainConfig, genesis, rws, engine)
|
||||||
|
@ -271,6 +271,8 @@ func ExecV3(ctx context.Context,
|
|||||||
if parallel {
|
if parallel {
|
||||||
// `rwLoop` lives longer than `applyLoop`
|
// `rwLoop` lives longer than `applyLoop`
|
||||||
rwLoop := func(ctx context.Context) error {
|
rwLoop := func(ctx context.Context) error {
|
||||||
|
defer stopWorkers()
|
||||||
|
|
||||||
tx, err := chainDb.BeginRw(ctx)
|
tx, err := chainDb.BeginRw(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -419,6 +421,7 @@ func ExecV3(ctx context.Context,
|
|||||||
if err = tx.Commit(); err != nil {
|
if err = tx.Commit(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
rws.Close()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user