aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/load.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Ignoring (but warn) on duplicate -wallet parametersJonas Schnelli2020-11-031-2/+6
|
* wallet: Make -wallet setting not create walletsRussell Yanofsky2020-10-211-2/+11
| | | | | | | | | | | | | | | | | | | | | This changes -wallet setting to only load existing wallets, not create new ones. - Fixes settings.json corner cases reported by sjors & promag: https://github.com/bitcoin-core/gui/issues/95, https://github.com/bitcoin/bitcoin/pull/19754#issuecomment-685858578, https://github.com/bitcoin/bitcoin/pull/19754#issuecomment-685858578 - Prevents accidental creation of wallets reported most recently by jb55 http://www.erisian.com.au/bitcoin-core-dev/log-2020-09-14.html#l-355 - Simplifies behavior after #15454. #15454 took the big step of disabling creation of the default wallet. This PR extends it to avoid creating other wallets as well. With this change, new wallets just aren't created on startup, instead of sometimes being created, sometimes not. #15454 release notes are updated here and are simpler. This change should be targeted for 0.21.0. It's a bug fix and simplifies behavior of the #15937 / #19754 / #15454 features added in 0.21.0.
* Do not create default walletAndrew Chow2020-09-081-4/+21
| | | | | | | | | | | | | No longer create a default wallet. The default wallet will still be loaded if it exists and not other wallets were specified (anywhere, including settings.json, bitcoin.conf, and command line). Tests are updated to be started with -wallet= if they need the default wallet. Added test to wallet_startup.py testing that no default wallet is created and that it is loaded if it exists and no other wallets were specified.
* refactor: Pass wallet database into CWallet::CreateRussell Yanofsky2020-09-031-2/+6
| | | | No changes in behavior
* wallet: Remove Verify and IsLoaded methodsRussell Yanofsky2020-09-031-4/+4
| | | | | | | | Checks are now consolidated in MakeBerkeleyDatabase function instead of happening in higher level code. This commit does not change behavior except for error messages which now include more complete information.
* Remove WalletLocation classRussell Yanofsky2020-09-031-4/+5
| | | | | | | | | | | This removes a source of complexity and indirection that makes it harder to understand path checking code. Path checks will be simplified in upcoming commits. There is no change in behavior in this commit other than a slightly more descriptive error message in `loadwallet` if the default "" wallet can't be found. (The error message is improved more in upcoming commit "wallet: Remove path checking code from loadwallet RPC".)
* wallet: Reload previously loaded wallets on GUI startupAndrew Chow2020-09-011-24/+2
| | | | | | | | | | | Enable the GUI to also use the load_on_startup feature. Wallets loaded in the GUI always have load_on_startup=true. When they are unloaded from the GUI, load_on_startup=false. To facilitate this change, UpdateWalletSetting is moved into the wallet module and called from within LoadWallet, RemoveWallet, and Createwallet. This change does not actually touch the GUI code but rather the wallet functions that are shared between the GUI and RPC.
* Add loadwallet and createwallet RPC load_on_startup optionsRussell Yanofsky2020-08-131-0/+25
| | | | | | | This maintains a persistent list of wallets stored in settings that will automatically be loaded on startup. Being able to load a wallet automatically on startup will be more useful in the GUI when the option to create wallets is added in #15006, but it's reasonable to expose this feature by RPC as well.
* walletdb: Move BerkeleyDatabase::Flush(true) to Close()Andrew Chow2020-07-141-2/+2
| | | | | Instead of having Flush optionally shutdown the database and environment, add a Close() function that does that.
* wallet: Never schedule MaybeCompactWalletDB when -flushwallet is offMarcoFalke2020-07-091-1/+4
|
* wallet: Pass unused args to StartWalletsMarcoFalke2020-07-091-1/+1
| | | | This refactor does not change behavior
* wallet: remove -salvagewalletAndrew Chow2020-05-251-6/+1
|
* gui: Do not translate InitWarning messages in debug.logHennadii Stepanov2020-05-101-2/+2
|
* Make InitError bilingualHennadii Stepanov2020-05-051-7/+7
|
* wallet: Avoid translating RPC errors when loading walletsMarcoFalke2020-05-011-9/+11
| | | | | | | Common errors and warnings should be translated when displayed in the GUI, but not translated when displayed elsewhere. The wallet method CreateWalletFromFile does not know its caller, so this commit changes it to return a bilingual_str to the caller.
* scripted-diff: Bump copyright headersMarcoFalke2020-04-161-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* wallet: Handle duplicate fileid exceptionJoão Barbosa2020-03-311-11/+15
|
* scheduler: Make schedule* methods type safeMarcoFalke2020-03-101-2/+2
|
* wallet: Avoid showing GUI popups on RPC errorsMarcoFalke2019-10-081-4/+9
|
* scripted-diff: Make translation bilingualHennadii Stepanov2019-07-241-5/+5
| | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/inline std::string _(const char\* psz)/inline bilingual_str _(const char\* psz)/' src/util/translation.h sed -i 's/return G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz;/return bilingual_str{psz, G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz};/' src/util/translation.h sed -i 's/\b_("\([^"]\|\\"\)*")/&.translated/g' $(git grep --files-with-matches '\b_("' src) echo Hard cases - multiline strings. sed -i 's/"Visit %s for further information about the software.")/&.translated/g' src/init.cpp sed -i "s/\"Only rebuild the block database if you are sure that your computer's date and time are correct\")/&.translated/g" src/init.cpp sed -i 's/" restore from a backup.")/&.translated/g' src/wallet/db.cpp sed -i 's/" or address book entries might be missing or incorrect.")/&.translated/g' src/wallet/wallet.cpp echo Special case. sed -i 's/_(COPYRIGHT_HOLDERS)/&.translated/' src/util/system.cpp test/lint/lint-format-strings.py -END VERIFY SCRIPT-
* Refactor out translation.hHennadii Stepanov2019-07-241-0/+1
| | | | | This is a prerequisite for introducing bilingual error messages. Note: #includes are arranged by clang-format-diff.py script.
* scripted-diff: Bump copyright headers in walletMarcoFalke2019-05-061-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/wallet/ -END VERIFY SCRIPT-
* [build] Move wallet load functions to wallet/load unitJohn Newbery2019-04-091-0/+112
Moves the following wallet load functions to a new wallet/load unit in the libbitcoin_wallet library. All other functions in wallet/init remain in libbitcoin_server: - `VerifyWallets` - `LoadWallets` - `StartWallets` - `FlushWallets` - `StopWallets` - `UnloadWallets`