OSDN Git Service

delete time waiter (#1111)
authoroysheng <33340252+oysheng@users.noreply.github.com>
Mon, 2 Jul 2018 09:04:04 +0000 (17:04 +0800)
committerPaladz <yzhu101@uottawa.ca>
Mon, 2 Jul 2018 09:04:04 +0000 (17:04 +0800)
api/wallet.go

index 30b34d3..5eb122e 100644 (file)
@@ -2,7 +2,6 @@ package api
 
 import (
        "context"
-       "time"
 
        "github.com/bytom/account"
        "github.com/bytom/asset"
@@ -60,13 +59,6 @@ func (a *API) backupWalletImage() Response {
 
 func (a *API) rescanWallet() Response {
        a.wallet.RescanBlocks()
-       for {
-               time.Sleep(50 * time.Microsecond)
-               walletStatus := a.wallet.GetWalletStatusInfo()
-               if walletStatus.WorkHeight != walletStatus.BestHeight {
-                       break
-               }
-       }
        return NewSuccessResponse(nil)
 }