Commit aa69a170 authored by liuyuhang's avatar liuyuhang

modify linter

parent be90fa42
......@@ -5,7 +5,6 @@
package kvmvccdb
import (
"fmt"
"github.com/33cn/chain33/common"
dbm "github.com/33cn/chain33/common/db"
......
......@@ -96,6 +96,7 @@ type Batch interface {
Reset() // Reset resets the batch for reuse
}
// MustWrite must write correct
func MustWrite(batch Batch) {
err := batch.Write()
if err != nil {
......
......@@ -268,7 +268,7 @@ func (mBatch *goLevelDBBatch) Delete(key []byte) {
func (mBatch *goLevelDBBatch) Write() error {
if mBatch.batch.Len() == 0 {
llog.Info("Write", "len", len)
llog.Info("Write", "len", mBatch.batch.Len())
return nil
}
err := mBatch.db.db.Write(mBatch.batch, mBatch.wop)
......
......@@ -366,7 +366,6 @@ func deleteOldNode(db dbm.DB, mp map[string][]hashData, curHeight int64, batch d
if len(mp) == 0 {
return
}
var err error
batch.Reset()
for key, vals := range mp {
if len(vals) > 1 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment