Skip to content

Commit

Permalink
erigon22: workers correct rollback #5387
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored Sep 16, 2022
1 parent 390108f commit 10039f0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/state/exec22/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,9 @@ func NewWorker22(lock sync.Locker, background bool, chainDb kv.RoDB, wg *sync.Wa

func (rw *Worker22) Tx() kv.Tx { return rw.chainTx }
func (rw *Worker22) ResetTx(chainTx kv.Tx) {
if rw.background && chainTx != nil {
if rw.chainTx != nil {
rw.chainTx.Rollback()
rw.chainTx = nil
}
if rw.background && rw.chainTx != nil {
rw.chainTx.Rollback()
rw.chainTx = nil
}
if chainTx != nil {
rw.chainTx = chainTx
Expand Down

0 comments on commit 10039f0

Please sign in to comment.