chainntnfs/neutrinonotify: track best block hash

This commit is contained in:
Wilmer Paulino
2018-12-10 18:29:25 -08:00
parent 060f2f7774
commit 568f8271a0
2 changed files with 34 additions and 43 deletions

View File

@@ -89,7 +89,8 @@ func (n *NeutrinoNotifier) UnsafeStart(bestHeight int32,
// Run notificationDispatcher after setting the notifier's best height
// to avoid a race condition.
n.bestHeight = uint32(bestHeight)
n.bestBlock.Hash = bestHash
n.bestBlock.Height = bestHeight
n.wg.Add(1)
go n.notificationDispatcher()