diff --git a/wallet/rescan.go b/wallet/rescan.go index 1946338..2221f80 100644 --- a/wallet/rescan.go +++ b/wallet/rescan.go @@ -192,6 +192,8 @@ out: // if it doesn't match the original hash returned by // the notification, to roll back and restart the // rescan. + log.Infof("Catching up block hashes to height %d, this"+ + " might take a while", n.Height) err := walletdb.Update(w.db, func(tx walletdb.ReadWriteTx) error { ns := tx.ReadWriteBucket(waddrmgrNamespaceKey) startBlock := w.Manager.SyncedTo() @@ -216,6 +218,7 @@ out: "sync state for hash %v (height %d): %v", n.Hash, n.Height, err) } + log.Info("Done catching up block hashes") case msg := <-w.rescanFinished: n := msg.Notification @@ -242,6 +245,8 @@ out: // if it doesn't match the original hash returned by // the notification, to roll back and restart the // rescan. + log.Infof("Catching up block hashes to height %d, this"+ + " might take a while", n.Height) err := walletdb.Update(w.db, func(tx walletdb.ReadWriteTx) error { ns := tx.ReadWriteBucket(waddrmgrNamespaceKey) startBlock := w.Manager.SyncedTo() @@ -269,6 +274,7 @@ out: } w.SetChainSynced(true) + log.Info("Done catching up block hashes") go w.resendUnminedTxs() case <-quit: diff --git a/wallet/wallet.go b/wallet/wallet.go index 4a5c6e3..9aa5615 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -356,6 +356,8 @@ func (w *Wallet) syncWithChain() error { if err != nil { return err } + log.Infof("Catching up block hashes to height %d, this will "+ + "take a while...", bestHeight) // Initialize the first database transaction. tx, err := w.db.BeginReadWriteTx() if err != nil { @@ -383,6 +385,7 @@ func (w *Wallet) syncWithChain() error { tx.Rollback() return err } + log.Infof("Caught up to height %d", height) tx, err = w.db.BeginReadWriteTx() if err != nil { return err @@ -396,6 +399,7 @@ func (w *Wallet) syncWithChain() error { tx.Rollback() return err } + log.Info("Done catching up block hashes") } // Compare previously-seen blocks against the chain server. If any of