[DEV-220] Fix NTBlockAccepted bug (#95)

This commit is contained in:
Ori Newman 2018-10-15 16:52:19 +03:00 committed by stasatdaglabs
parent 65788d4dc0
commit 0bb2030200

View File

@ -4242,11 +4242,7 @@ func NewRPCServer(
func (s *Server) handleBlockchainNotification(notification *blockdag.Notification) {
switch notification.Type {
case blockdag.NTBlockAccepted:
tipHashes, ok := notification.Data.([]daghash.Hash)
if !ok {
log.Warnf("Chain accepted notification is not a block.")
break
}
tipHashes := s.cfg.DAG.TipHashes()
// Allow any clients performing long polling via the
// getblocktemplate RPC to be notified when the new block causes