From 5e18693d2a04b497a6d39bec7050e0f856c00973 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Thu, 31 Jul 2014 08:27:30 -0500 Subject: [PATCH] Register for ntfns when the RPCS creates wallets. Previously, registerations for wallet notifications (new txs, changed account balances) were only passed up to websocket clients if the wallet was loaded off disk (SetWallet was called with a non-nil wallet), and not for the case when the RPC server would create the wallet (if it wasn't created yet, and the user manually created it with createencryptedwallet). This change fixes that by registering for these notifications when this code path is taken. --- rpcserver.go | 1 + 1 file changed, 1 insertion(+) diff --git a/rpcserver.go b/rpcserver.go index ac7e3e9..4165a99 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2406,6 +2406,7 @@ func (s *rpcServer) handleCreateEncryptedWallet(request []byte) (interface{}, er } s.wallet = wallet + s.registerWalletNtfns <- struct{}{} s.handlerLock = noopLocker{} s.handlerLookup = lookupAnyHandler