Update for recent btcchain orphan notify change.
This commit is contained in:
parent
3525552140
commit
adf7149838
1 changed files with 3 additions and 2 deletions
|
@ -271,8 +271,9 @@ func (b *blockManager) handleNotifyMsg(notification *btcchain.Notification) {
|
||||||
switch notification.Type {
|
switch notification.Type {
|
||||||
// An orphan block has been accepted by the block chain.
|
// An orphan block has been accepted by the block chain.
|
||||||
case btcchain.NTOrphanBlock:
|
case btcchain.NTOrphanBlock:
|
||||||
orphanRoot := notification.Data.(*btcwire.ShaHash)
|
orphanHash := notification.Data.(*btcwire.ShaHash)
|
||||||
if peer, exists := b.blockPeer[*orphanRoot]; exists {
|
if peer, exists := b.blockPeer[*orphanHash]; exists {
|
||||||
|
orphanRoot := b.blockChain.GetOrphanRoot(orphanHash)
|
||||||
locator, err := b.blockChain.LatestBlockLocator()
|
locator, err := b.blockChain.LatestBlockLocator()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("[BMGR] Failed to get block locator "+
|
log.Errorf("[BMGR] Failed to get block locator "+
|
||||||
|
|
Loading…
Reference in a new issue