From 10039f0431c499784c75b740d9486640509afbdd Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Fri, 16 Sep 2022 11:17:56 +0700 Subject: [PATCH] erigon22: workers correct rollback #5387 --- cmd/state/exec22/state.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/state/exec22/state.go b/cmd/state/exec22/state.go index af1d0793b..3a7be872a 100644 --- a/cmd/state/exec22/state.go +++ b/cmd/state/exec22/state.go @@ -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