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:
Josh Rickmar 2013-11-12 14:50:33 -05:00
parent 77e1af792b
commit afc520634f

View file

@ -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.