mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
Fix longpoll getblocktemplate not getting notified if a block is pushed via submitblock
This commit is contained in:
parent
0280fa0264
commit
9c039f5fe4
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user