OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38ba770
)
update DeleteTransactions
author
Chengcheng Zhang
<943420582@qq.com>
Mon, 8 Jul 2019 02:07:32 +0000
(10:07 +0800)
committer
Chengcheng Zhang
<943420582@qq.com>
Mon, 8 Jul 2019 02:07:32 +0000
(10:07 +0800)
database/wallet_store.go
patch
|
blob
|
history
diff --git
a/database/wallet_store.go
b/database/wallet_store.go
index
85363b7
..
889e7dd
100644
(file)
--- a/
database/wallet_store.go
+++ b/
database/wallet_store.go
@@
-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())
}