diff --git a/blockmanager.go b/blockmanager.go index ff3e1418..91521d2b 100644 --- a/blockmanager.go +++ b/blockmanager.go @@ -94,7 +94,7 @@ func (b *blockManager) startSync(peers *list.List) { if bestPeer != nil { locator, err := b.blockChain.LatestBlockLocator() if err != nil { - log.Error("[BMGR] Failed to get block locator for the "+ + log.Errorf("[BMGR] Failed to get block locator for the "+ "latest block: %v", err) return } @@ -269,12 +269,13 @@ out: // connected to and disconnected from the main chain. func (b *blockManager) handleNotifyMsg(notification *btcchain.Notification) { switch notification.Type { + // An orphan block has been accepted by the block chain. case btcchain.NTOrphanBlock: orphanRoot := notification.Data.(*btcwire.ShaHash) if peer, exists := b.blockPeer[*orphanRoot]; exists { locator, err := b.blockChain.LatestBlockLocator() if err != nil { - log.Error("[BMGR] Failed to get block locator "+ + log.Errorf("[BMGR] Failed to get block locator "+ "for the latest block: %v", err) break } diff --git a/peer.go b/peer.go index faabbed6..5d0863c7 100644 --- a/peer.go +++ b/peer.go @@ -352,7 +352,7 @@ func (p *peer) handleInvMsg(msg *btcwire.MsgInv) { orphanRoot := chain.GetOrphanRoot(&iv.Hash) locator, err := chain.LatestBlockLocator() if err != nil { - log.Error("[PEER] Failed to get block "+ + log.Errorf("[PEER] Failed to get block "+ "locator for the latest block: "+ "%v", err) continue