From afc520634f4cefd82c3bf2317cdc834ca90f55e1 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 12 Nov 2013 14:50:33 -0500 Subject: [PATCH] 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. --- blockmanager.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blockmanager.go b/blockmanager.go index 23702087..318c5b00 100644 --- a/blockmanager.go +++ b/blockmanager.go @@ -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.