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