From adf7149838cbcff90e11cf317594735eff5792f3 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Mon, 9 Sep 2013 19:58:38 -0500 Subject: [PATCH] Update for recent btcchain orphan notify change. --- blockmanager.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blockmanager.go b/blockmanager.go index 91521d2b..fb066e76 100644 --- a/blockmanager.go +++ b/blockmanager.go @@ -271,8 +271,9 @@ 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 { + orphanHash := notification.Data.(*btcwire.ShaHash) + if peer, exists := b.blockPeer[*orphanHash]; exists { + orphanRoot := b.blockChain.GetOrphanRoot(orphanHash) locator, err := b.blockChain.LatestBlockLocator() if err != nil { log.Errorf("[BMGR] Failed to get block locator "+