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
|
// Notify frontends
|
||||||
if r := b.server.rpcServer; r != nil {
|
if r := b.server.rpcServer; r != nil {
|
||||||
go r.NotifyBlockConnected(block)
|
go func() {
|
||||||
go r.NotifyBlockTXs(b.server.db, block)
|
r.NotifyBlockTXs(b.server.db, block)
|
||||||
|
r.NotifyBlockConnected(block)
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
// A block has been disconnected from the main block chain.
|
// A block has been disconnected from the main block chain.
|
||||||
|
|
Loading…
Reference in a new issue