From ed7dd7acd30e88486007459892b590865820736f Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Fri, 30 Oct 2020 15:38:25 +0700 Subject: [PATCH] mdbx_fix_err_check (#1324) --- ethdb/kv_mdbx.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ethdb/kv_mdbx.go b/ethdb/kv_mdbx.go index 4fc658109..bce443e49 100644 --- a/ethdb/kv_mdbx.go +++ b/ethdb/kv_mdbx.go @@ -14,7 +14,6 @@ import ( "time" "github.com/c2h5oh/datasize" - "github.com/ledgerwatch/lmdb-go/lmdb" "github.com/ledgerwatch/turbo-geth/common/dbutils" "github.com/ledgerwatch/turbo-geth/ethdb/mdbx" "github.com/ledgerwatch/turbo-geth/log" @@ -1036,10 +1035,10 @@ func (c *MdbxCursor) Delete(k, v []byte) error { return c.deleteDupSort(k) } - if c.bucketCfg.Flags&lmdb.DupSort != 0 { + if c.bucketCfg.Flags&mdbx.DupSort != 0 { _, _, err := c.getBoth(k, v) if err != nil { - if lmdb.IsNotFound(err) { + if mdbx.IsNotFound(err) { return nil } return err @@ -1049,7 +1048,7 @@ func (c *MdbxCursor) Delete(k, v []byte) error { _, _, err := c.set(k) if err != nil { - if lmdb.IsNotFound(err) { + if mdbx.IsNotFound(err) { return nil } return err