OSDN Git Service

update
authorChengcheng Zhang <943420582@qq.com>
Mon, 24 Jun 2019 15:45:55 +0000 (23:45 +0800)
committerChengcheng Zhang <943420582@qq.com>
Mon, 24 Jun 2019 15:45:55 +0000 (23:45 +0800)
wallet/utxo.go
wallet/wallet.go

index 66260b2..78b6e0f 100644 (file)
@@ -73,7 +73,7 @@ func (w *Wallet) attachUtxos(b *types.Block, txStatus *bc.TransactionStatus) {
                outputUtxos := txOutToUtxos(tx, statusFail, b.Height)
                utxos := w.filterAccountUtxo(outputUtxos)
                if err := w.saveUtxos(utxos); err != nil {
-                       log.WithFields(log.Fields{"module": logModule, "err": err}).Error("attachUtxos fail on batchSaveUtxos")
+                       log.WithFields(log.Fields{"module": logModule, "err": err}).Error("attachUtxos fail on saveUtxos")
                }
        }
 }
index d3d97da..f2c8c58 100644 (file)
@@ -2,6 +2,7 @@ package wallet
 
 import (
        "encoding/json"
+       "fmt"
        "sync"
 
        log "github.com/sirupsen/logrus"
@@ -181,6 +182,7 @@ func (w *Wallet) AttachBlock(block *types.Block) error {
        if err != nil {
                return err
        }
+       fmt.Println("txStatus is:", txStatus)
 
        if err := w.RecoveryMgr.FilterRecoveryTxs(block); err != nil {
                log.WithField("err", err).Error("filter recovery txs")
@@ -188,6 +190,7 @@ func (w *Wallet) AttachBlock(block *types.Block) error {
        }
 
        annotatedTxs := w.filterAccountTxs(block, txStatus)
+       fmt.Println("len(annotatedTxs) is:", len(annotatedTxs))
        saveExternalAssetDefinition(block, w.store)
        annotateTxsAccount(annotatedTxs, w.store)