config: remove noinitload related configs

This commit is contained in:
Roy Lee 2022-09-28 23:02:38 -07:00
parent 10d58126b5
commit 7a4cd602bb
2 changed files with 5 additions and 14 deletions

View file

@ -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"`

View file

@ -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