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