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.
This commit is contained in:
Josh Rickmar 2014-07-31 08:27:30 -05:00
parent dd856160aa
commit 5e18693d2a

View file

@ -2406,6 +2406,7 @@ func (s *rpcServer) handleCreateEncryptedWallet(request []byte) (interface{}, er
}
s.wallet = wallet
s.registerWalletNtfns <- struct{}{}
s.handlerLock = noopLocker{}
s.handlerLookup = lookupAnyHandler