mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
mdbx_fix_err_check (#1324)
This commit is contained in:
parent
1cf5ee279d
commit
ed7dd7acd3
@ -14,7 +14,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/c2h5oh/datasize"
|
"github.com/c2h5oh/datasize"
|
||||||
"github.com/ledgerwatch/lmdb-go/lmdb"
|
|
||||||
"github.com/ledgerwatch/turbo-geth/common/dbutils"
|
"github.com/ledgerwatch/turbo-geth/common/dbutils"
|
||||||
"github.com/ledgerwatch/turbo-geth/ethdb/mdbx"
|
"github.com/ledgerwatch/turbo-geth/ethdb/mdbx"
|
||||||
"github.com/ledgerwatch/turbo-geth/log"
|
"github.com/ledgerwatch/turbo-geth/log"
|
||||||
@ -1036,10 +1035,10 @@ func (c *MdbxCursor) Delete(k, v []byte) error {
|
|||||||
return c.deleteDupSort(k)
|
return c.deleteDupSort(k)
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.bucketCfg.Flags&lmdb.DupSort != 0 {
|
if c.bucketCfg.Flags&mdbx.DupSort != 0 {
|
||||||
_, _, err := c.getBoth(k, v)
|
_, _, err := c.getBoth(k, v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if lmdb.IsNotFound(err) {
|
if mdbx.IsNotFound(err) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
@ -1049,7 +1048,7 @@ func (c *MdbxCursor) Delete(k, v []byte) error {
|
|||||||
|
|
||||||
_, _, err := c.set(k)
|
_, _, err := c.set(k)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if lmdb.IsNotFound(err) {
|
if mdbx.IsNotFound(err) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user