-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
client/{core,db}: options for core startup/shutdown
This adds two new core.Config options aimed at improving startup and shutdown depending on the user's use case: - NoAutoWalletLock instructs Core to skip locking the wallet on shutdown. This can be helpful if the user wants the wallet to remain unlocked. e.g. They started with the wallet unlocked, or they intend to start Core again and wish to avoid the time to unlock a locked wallet on startup. - NoAutoDBBackup instructs the DB to skip the creation of a backup DB file on shutdown. This is useful if the consumer is using the BackupDB method, or simply creating manual backups of the DB file after shutdown. These options are intended for direct Core consumers, such as headless applications that drive Core directly instead of via the browser UI. These options are created so that the zero-value corresponds to legacy behavior. That is, the defaults are the existing behavior. However, in client/db/bolt, the BackupOnShutdown is reversed from Core's NoAutoDBBackup flag. The NewDB constructor accepts an optional db.Opts struct, and if it is not provided, a defaultOpts is used that has BackupOnShutdown set to true.
- Loading branch information
Showing
2 changed files
with
55 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters