Process all tx notifications, then notify new block.
This change allows wallet to record all transactions in a block before receving the new block notification, and then process them all together when the blockconnected notification arrives.
This commit is contained in:
parent
77e1af792b
commit
afc520634f
1 changed files with 4 additions and 2 deletions
|
@ -652,8 +652,10 @@ func (b *blockManager) handleNotifyMsg(notification *btcchain.Notification) {
|
|||
|
||||
// Notify frontends
|
||||
if r := b.server.rpcServer; r != nil {
|
||||
go r.NotifyBlockConnected(block)
|
||||
go r.NotifyBlockTXs(b.server.db, block)
|
||||
go func() {
|
||||
r.NotifyBlockTXs(b.server.db, block)
|
||||
r.NotifyBlockConnected(block)
|
||||
}()
|
||||
}
|
||||
|
||||
// A block has been disconnected from the main block chain.
|
||||
|
|
Loading…
Reference in a new issue