Fix longpoll getblocktemplate not getting notified if a block is pushed via submitblock
This commit is contained in:
parent
0280fa0264
commit
9c039f5fe4
1 changed files with 8 additions and 0 deletions
|
@ -1142,6 +1142,14 @@ out:
|
||||||
newestSha, newestHeight, _ := b.server.db.NewestSha()
|
newestSha, newestHeight, _ := b.server.db.NewestSha()
|
||||||
b.updateChainState(newestSha, newestHeight)
|
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{
|
msg.reply <- processBlockResponse{
|
||||||
isOrphan: isOrphan,
|
isOrphan: isOrphan,
|
||||||
err: nil,
|
err: nil,
|
||||||
|
|
Loading…
Add table
Reference in a new issue