OSDN Git Service

update DeleteTransactions
authorChengcheng Zhang <943420582@qq.com>
Mon, 8 Jul 2019 02:07:32 +0000 (10:07 +0800)
committerChengcheng Zhang <943420582@qq.com>
Mon, 8 Jul 2019 02:07:32 +0000 (10:07 +0800)
database/wallet_store.go

index 85363b7..889e7dd 100644 (file)
@@ -6,6 +6,8 @@ import (
        "encoding/json"
        "fmt"
 
+       log "github.com/sirupsen/logrus"
+
        acc "github.com/vapor/account"
        "github.com/vapor/asset"
        "github.com/vapor/blockchain/query"
@@ -169,6 +171,8 @@ func (store *WalletStore) DeleteTransactions(height uint64) {
        for txIter.Next() {
                if err := json.Unmarshal(txIter.Value(), &tmpTx); err == nil {
                        batch.Delete(calcTxIndexKey(tmpTx.ID.String()))
+               } else {
+                       log.WithFields(log.Fields{"module": logModule, "err": err}).Warning("fail on DeleteTransactions.")
                }
                batch.Delete(txIter.Key())
        }