Skip to content

Commit

Permalink
config: remove noinitload related configs
Browse files Browse the repository at this point in the history
  • Loading branch information
roylee17 committed Sep 29, 2022
1 parent 10d5812 commit 7a4cd60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
1 change: 0 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
18 changes: 5 additions & 13 deletions lbcwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a4cd60

Please sign in to comment.