diff --git a/blockmanager.go b/blockmanager.go index 68d01610..c907e6e1 100644 --- a/blockmanager.go +++ b/blockmanager.go @@ -1142,6 +1142,14 @@ out: newestSha, newestHeight, _ := b.server.db.NewestSha() b.updateChainState(newestSha, newestHeight) + // Allow any clients performing long polling via the + // getblocktemplate RPC to be notified when the new block causes + // their old block template to become stale. + rpcServer := b.server.rpcServer + if rpcServer != nil { + rpcServer.gbtWorkState.NotifyBlockConnected(msg.block.Sha()) + } + msg.reply <- processBlockResponse{ isOrphan: isOrphan, err: nil,