mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
erigon22: workers correct rollback #5387
This commit is contained in:
parent
390108f352
commit
10039f0431
@ -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) Tx() kv.Tx { return rw.chainTx }
|
||||||
func (rw *Worker22) ResetTx(chainTx kv.Tx) {
|
func (rw *Worker22) ResetTx(chainTx kv.Tx) {
|
||||||
if rw.background && chainTx != nil {
|
if rw.background && rw.chainTx != nil {
|
||||||
if rw.chainTx != nil {
|
rw.chainTx.Rollback()
|
||||||
rw.chainTx.Rollback()
|
rw.chainTx = nil
|
||||||
rw.chainTx = nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if chainTx != nil {
|
if chainTx != nil {
|
||||||
rw.chainTx = chainTx
|
rw.chainTx = chainTx
|
||||||
|
Loading…
Reference in New Issue
Block a user