OSDN Git Service

remove comments
authorChengcheng Zhang <943420582@qq.com>
Thu, 4 Jul 2019 19:15:57 +0000 (03:15 +0800)
committerChengcheng Zhang <943420582@qq.com>
Thu, 4 Jul 2019 19:15:57 +0000 (03:15 +0800)
test/wallet_test.go
wallet/wallet.go

index 53540e8..deaf268 100644 (file)
@@ -114,7 +114,6 @@ func TestWalletUpdate(t *testing.T) {
        }
 
        for position, tx := range block.Transactions {
-               // get := w.store.GetGlobalTransactionIndex(tx.ID.String())
                get := testDB.Get(database.CalcGlobalTxIndexKey(tx.ID.String()))
                bh := block.BlockHeader.Hash()
                expect := database.CalcGlobalTxIndex(&bh, uint64(position))
index 722e726..5b25ded 100644 (file)
@@ -1,7 +1,6 @@
 package wallet
 
 import (
-       "fmt"
        "sync"
 
        log "github.com/sirupsen/logrus"
@@ -168,9 +167,6 @@ func (w *Wallet) AttachBlock(block *types.Block) error {
        w.rw.Lock()
        defer w.rw.Unlock()
 
-       fmt.Println("block.PreviousBlockHash:", block.PreviousBlockHash)
-       fmt.Println("w.status.WorkHash:", w.status.WorkHash)
-
        if block.PreviousBlockHash != w.status.WorkHash {
                log.Warn("wallet skip attachBlock due to status hash not equal to previous hash")
                return nil