diff --git a/config.go b/config.go index aeda0e6..060bc6e 100644 --- a/config.go +++ b/config.go @@ -57,7 +57,6 @@ type config struct { SigNet bool `long:"signet" description:"Use the signet test network (default client port: 49244, server port: 49245)"` SigNetChallenge string `long:"signetchallenge" description:"Connect to a custom signet network defined by this challenge instead of using the global default signet test network -- Can be specified multiple times"` SigNetSeedNode []string `long:"signetseednode" description:"Specify a seed node for the signet network instead of using the global default signet network seed nodes"` - NoInitialLoad bool `long:"noinitialload" description:"Defer wallet creation/opening on startup and enable loading wallets over RPC"` DebugLevel string `short:"d" long:"debuglevel" description:"Logging level {trace, debug, info, warn, error, critical}"` LogDir string `long:"logdir" description:"Directory to log output."` Profile string `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536"` diff --git a/lbcwallet.go b/lbcwallet.go index 4d8ffbb..c2b4f4c 100644 --- a/lbcwallet.go +++ b/lbcwallet.go @@ -81,24 +81,16 @@ func walletMain() error { return err } - // Create and start chain RPC client so it's ready to connect to - // the wallet when loaded later. - if !cfg.NoInitialLoad { - go rpcClientConnectLoop(legacyRPCServer, loader) - } + go rpcClientConnectLoop(legacyRPCServer, loader) loader.RunAfterLoad(func(w *wallet.Wallet) { startWalletRPCServices(w, legacyRPCServer) }) - if !cfg.NoInitialLoad { - // Load the wallet database. It must have been created already - // or this will return an appropriate error. - _, err = loader.OpenExistingWallet(true) - if err != nil { - log.Error(err) - return err - } + _, err = loader.OpenExistingWallet(true) + if err != nil { + log.Error(err) + return err } // Add interrupt handlers to shutdown the various process components