Commit aa69a170 authored by liuyuhang's avatar liuyuhang

modify linter

parent be90fa42
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
package kvmvccdb package kvmvccdb
import ( import (
"fmt"
"github.com/33cn/chain33/common" "github.com/33cn/chain33/common"
dbm "github.com/33cn/chain33/common/db" dbm "github.com/33cn/chain33/common/db"
......
...@@ -96,6 +96,7 @@ type Batch interface { ...@@ -96,6 +96,7 @@ type Batch interface {
Reset() // Reset resets the batch for reuse Reset() // Reset resets the batch for reuse
} }
// MustWrite must write correct
func MustWrite(batch Batch) { func MustWrite(batch Batch) {
err := batch.Write() err := batch.Write()
if err != nil { if err != nil {
......
...@@ -268,7 +268,7 @@ func (mBatch *goLevelDBBatch) Delete(key []byte) { ...@@ -268,7 +268,7 @@ func (mBatch *goLevelDBBatch) Delete(key []byte) {
func (mBatch *goLevelDBBatch) Write() error { func (mBatch *goLevelDBBatch) Write() error {
if mBatch.batch.Len() == 0 { if mBatch.batch.Len() == 0 {
llog.Info("Write", "len", len) llog.Info("Write", "len", mBatch.batch.Len())
return nil return nil
} }
err := mBatch.db.db.Write(mBatch.batch, mBatch.wop) 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 ...@@ -366,7 +366,6 @@ func deleteOldNode(db dbm.DB, mp map[string][]hashData, curHeight int64, batch d
if len(mp) == 0 { if len(mp) == 0 {
return return
} }
var err error
batch.Reset() batch.Reset()
for key, vals := range mp { for key, vals := range mp {
if len(vals) > 1 { 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