aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
AgeCommit message (Collapse)Author
2021-07-01Merge bitcoin/bitcoin#22255: [0.21] wallet: Do not iterate a directory if ↵MarcoFalke
having an error while accessing it 7b0b201d109b6240f114498fc1b94af9cb85f26e wallet: Do not iterate a directory if having an error while accessing it (Hennadii Stepanov) Pull request description: This change prevents infinite looping for, for example, system folders on Windows. Github-Pull: #21907 Rebased-From: 29c9e2c2d2015ade47ed4497926363dea3f9c59b Note: Trivial backport, but in a differently-named function in another file ACKs for top commit: hebasto: ACK 7b0b201d109b6240f114498fc1b94af9cb85f26e, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: d41ab267250e8bfd9289cacf1fd804cc1a3bb20fc479dc9da5a69ebf26530b552b11b2ee6b11e17a1c146ca792ee65bd64eeb2269fa5e73a70361da8a2a09925
2021-06-15wallet: Do not iterate a directory if having an error while accessing itHennadii Stepanov
This change prevents infinite looping for, for example, system folders on Windows. Github-Pull: #21907 Rebased-From: 29c9e2c2d2015ade47ed4497926363dea3f9c59b
2021-04-16Merge #21520: [0.21] wallet: Avoid requesting fee rates multiple times ↵fanquake
during coin selection d61fb07da7c12e4a1f68cf645f32d563a657a506 Rename CoinSelectionParams::effective_fee to m_effective_feerate (Andrew Chow) 5fc381e443d6d967e6f7f8bc88a4fd66e18379eb wallet: Move discard feerate fetching to CreateTransaction (Andrew Chow) bcd716670ba8a189a2e9b8b035318abceb9ce631 wallet: Move long term feerate setting to CreateTransaction (Andrew Chow) 34c89f92f34b5ca12da95d5f0b0240682c5a1c1f wallet: Replace nFeeRateNeeded with effective_fee (Andrew Chow) 48fc675163a657e615fd4b2680fc3accba12f95d wallet: Use existing feerate instead of getting a new one (Andrew Chow) Pull request description: Backport of #21083 ACKs for top commit: MarcoFalke: cherry-pick-only re-ACK d61fb07da7c12e4a1f68cf645f32d563a657a506 🔙 instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/21520/commits/d61fb07da7c12e4a1f68cf645f32d563a657a506 Tree-SHA512: 23b212301bb467153dd9723903918ae01dd520525c81d541c411e7a4381e46594fe032e2a7c06ddcff7dc56dcb546991d50187c33fcff08ec45bd835cc01bd19
2021-04-01Rename CoinSelectionParams::effective_fee to m_effective_feerateAndrew Chow
It's a feerate, not a fee. Also follow the style guide for member names. Github-Pull: #21083 Rebased-From: f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3
2021-03-24wallet: Move discard feerate fetching to CreateTransactionAndrew Chow
Instead of fetching the discard feerate for each SelectCoinsMinConf iteration, fetch and cache it once during CreateTransaction so that it is shared for each SelectCoinsMinConf through coin_selection_params.m_discard_feerate. Does not change behavior. Github-Pull: #21083 Rebased-From: bdd0c2934b7f389ffcfae3b602ee3ecee8581acd
2021-03-24wallet: Move long term feerate setting to CreateTransactionAndrew Chow
Instead of setting the long term feerate for each SelectCoinsMinConf iteration, set it once during CreateTransaction and let it be shared with each SelectCoinsMinConf through coin_selection_params.m_long_term_feerate. Does not change behavior. Github-Pull: #21083 Rebased-From: 448d04b931f86941903e855f831249ff5ec77485
2021-03-24wallet: Replace nFeeRateNeeded with effective_feeAndrew Chow
Make sure that all fee calculations use the same feerate. coin_selection_params.effective_fee is the variable we use for all fee calculations, so get rid of remaining nFeeRateNeeded usages and just directly set coin_selection_params.effective_fee. Does not change behavior. Github-Pull: #21083 Rebased-From: e2f429e6bbf7098f278c0247b954ecd3ba53cf37
2021-03-24wallet: Use existing feerate instead of getting a new oneAndrew Chow
During each loop of CreateTransaction, instead of constantly getting a new feerate, use the feerate that we have already fetched for all fee calculations. Thix fixes a race condition where the feerate required changes during each iteration of the loop. This commit changes behavior as the "Fee estimation failed" error will now take priority over "Signing transaction failed". Github-Pull: #21083 Rebased-From: 1a6a0b0dfb90f9ebd4b86d7934c6aa5594974f5f
2021-02-19Disallow sendtoaddress and sendmany when private keys disabledAndrew Chow
Github-Pull: #21201 Rebased-From: 0997019e7681efb00847a7246c15ac8f235128d8
2020-12-10wallet, bugfix: allow send to take string fee rate valuesJon Atack
Github-Pull: #20573 Rebased-From: ce207d6b93d35bc02fcd2dd28f1fd95869261d43
2020-11-26Use the correct incremental fee constant in bumpfee helpJon Atack
and remove redundant units ("Must be at least 1.000 sat/vB sat/vB" -> "1.00 sat vB") Github-Pull: #20426 Rebased-From: 9f08780dd7946b63476e9736745131db8e7f4e93
2020-11-26Allow zero-fee fundrawtxn and walletcreatefundedpsbt callsJon Atack
A check to raise an error on zero-fee txns was mistakenly extended in commit a0d4957 from the bumpfee and send{toaddress, many} RPCs to also include fundrawtransaction and walletcreatefundedpsbt. This commit overrides zero fee rate checking for these two RPCs, not only for the feeRate (BTC/kvB) arg to return to previous behavior, but also for the new fee_rate (sat/vB) arg. Github-Pull: #20426 Rebased-From: 1b3d7009280595108eb22ac1188bc43678
2020-11-25Merge #20490: [backport] wallet: upgradewallet fixes, improvements, test ↵MarcoFalke
coverage ca8cd893bb56bf5d455154b0498b1f58f77d20ed wallet: fix and improve upgradewallet error responses (Jon Atack) 99d56e357159c7154f69f28cb5587c5ca20d6594 wallet: fix and improve upgradewallet result responses (Jon Atack) 2498b04ce88696a3216fc38b7d393906b733e8b1 Don't upgrade to HD split if it is already supported (Andrew Chow) c46c18b788cb0862aafbb116fd37936cbed6a431 wallet: refactor GetClosestWalletFeature() (Jon Atack) Pull request description: Github-Pull: #20403 Rebased-From: c46c18b788cb0862aafbb116fd37936cbed6a431 Github-Pull: #20403 Rebased-From: 2498b04ce88696a3216fc38b7d393906b733e8b1 Github-Pull: #20403 Rebased-From: 99d56e357159c7154f69f28cb5587c5ca20d6594 Github-Pull: #20403 Rebased-From: ca8cd893bb56bf5d455154b0498b1f58f77d20ed Top commit has no ACKs. Tree-SHA512: b18a1d015c963298740c585385eaa056988464112c88a519fe619be22dc78a8f6a102365cf799c50b781a77a09bec82b58ce411ab007b48f8b5de876e9c75060
2020-11-25Merge #20485: [backport] wallet: Do not treat default constructed types as ↵MarcoFalke
None-type fa69c2c78455fd0dc436018fece9ff7fc83a180d wallet: Do not treat default constructed types as None-type (MarcoFalke) fac4e136fa3d0fab7fde900a6be921313e16e7a6 refactor: Change pointer to reference because it can not be null (MarcoFalke) Pull request description: Github-Pull: #20410 Rebased-From: fac4e136fa3d0fab7fde900a6be921313e16e7a6 Github-Pull: #20410 Rebased-From: fa69c2c78455fd0dc436018fece9ff7fc83a180d Top commit has no ACKs. Tree-SHA512: 05c3fe29677710b57dcc482fd529b0ab79475519f60f9cfde19f956c4e2212d09b042af458ec4f1272c581360ce841b735dca4df144e0798b3ccf16547de9cd0
2020-11-24RPC/Wallet: unloadwallet: Clarify docs/error when both the RPC endpoint and ↵Luke Dashjr
wallet_name parameter specify a wallet
2020-11-19wallet: fix and improve upgradewallet error responsesJon Atack
2020-11-19wallet: fix and improve upgradewallet result responsesJon Atack
2020-11-19wallet: Do not treat default constructed types as None-typeMarcoFalke
2020-11-19Don't upgrade to HD split if it is already supportedAndrew Chow
It is unnecessary to upgrade to FEATURE_HD_SPLIT if this feature is already supported by the wallet. Because upgrading to FEATURE_HD_SPLIT actually requires upgrading to FEATURE_PRE_SPLIT_KEYPOOL, users would accidentally be upgraded to FEATURE_PRE_SPLIT_KEYPOOL instead of nothing being done. Fixes the issue described at https://github.com/bitcoin/bitcoin/pull/20403#discussion_r526063920
2020-11-18wallet: refactor GetClosestWalletFeature()Jon Atack
2020-11-18refactor: Change pointer to reference because it can not be nullMarcoFalke
2020-11-17Merge #20305: wallet: introduce fee_rate sat/vB param/optionMarcoFalke
05e82d86b09d914ebce05dbc92a7299cb026847b wallet: override minfee checks (fOverrideFeeRate) for fee_rate (Jon Atack) 9a670b4f07a6140de809d73cbd7f3e614eb6ea74 wallet: update sendtoaddress, send RPC examples with fee_rate (Jon Atack) be481b72e24fb6834bd674cd8daee67c6938b42d wallet: use MIN_RELAY_TX_FEE in bumpfee help (Jon Atack) 449b730579566459e350703611629e63e54657ed wallet: provide valid values if invalid estimate mode passed (Jon Atack) 6da3afbaee5809ebf6d88efaa3958c505c2d71c7 wallet: update remaining rpcwallet fee rate units to BTC/kvB (Jon Atack) 173b5b5fe07d45be5a1e5bc7a5df996f20ab1e85 wallet: update fee rate units, use sat/vB for fee_rate error messages (Jon Atack) 7f9835a05abf3e168ad93e7195cbaa4bf61b9b07 wallet: remove fee rates from conf_target helps (Jon Atack) b7994c01e9a3251536fe6538a22f614774eec82d wallet: add fee_rate unit warnings to bumpfee (Jon Atack) 410e471fa42d3db04e8879c71f8c824dcc151a83 wallet: remove redundant bumpfee fee_rate checks (Jon Atack) a0d495747320c79b27a83c216dcc526ac8df8f24 wallet: introduce fee_rate (sat/vB) param/option (Jon Atack) e21212f01b7c41eba13b0479b252053cf482bc1f wallet: remove unneeded WALLET_BTC_KB_TO_SAT_B constant (Jon Atack) 6112cf20d43b0be34fe0edce2ac3e6b27cae1bbe wallet: add CFeeRate ctor doxygen documentation (Jon Atack) 3f7279161347543ce4e997d78ea89a4043491145 wallet: fix bug in RPC send options (Jon Atack) Pull request description: This PR builds on #11413 and #20220 to address #19543. - replace overloading the conf_target and estimate_mode params with `fee_rate` in sat/vB in the sendtoaddress, sendmany, send, fundrawtransaction, walletcreatefundedpsbt, and bumpfee RPCs - allow non-actionable conf_target value of `0` and estimate_mode value of `""` to be passed to use `fee_rate` as a positional argument, in addition to as a named argument - fix a bug in the experimental send RPC described in https://github.com/bitcoin/bitcoin/pull/20220#discussion_r513789526 where args were not being passed correctly into the options values - update the feerate error message units for these RPCs from BTC/kB to sat/vB - update the test coverage, help docs, doxygen docs, and some of the RPC examples - other changes to address the excellent review feedback See this wallet meeting log for more context: http://www.erisian.com.au/bitcoin-core-dev/log-2020-11-06.html#l-309 ACKs for top commit: achow101: re-ACK 05e82d8 MarcoFalke: review ACK 05e82d86b0 did not test and found a few style nits, which can be fixed later 🍯 Xekyo: tACK 05e82d86b09d914ebce05dbc92a7299cb026847b Sjors: utACK 05e82d86b09d914ebce05dbc92a7299cb026847b Tree-SHA512: a4ee5f184ada53f1840b2923d25873bda88c5a2ae48e67eeea2417a0b35154798cfdb3c147b05dd56bd6608a784e1b91623bb985ee2ab9ef2baaec22206d0a9c
2020-11-17Merge #20139: Wallet: do not return warnings from UpgradeWallet()MarcoFalke
963696288955dc31b3a4fd136bfb791a9d99755b [upgradewallet] removed unused warning param (Sishir Giri) Pull request description: The `warning` variable was unused in `upgradewallet` so I removed it ACKs for top commit: practicalswift: ACK 963696288955dc31b3a4fd136bfb791a9d99755b: diff looks correct MarcoFalke: review ACK 963696288955dc31b3a4fd136bfb791a9d99755b jonatack: ACK 963696288955dc31b3a4fd136bfb791a9d99755b Tree-SHA512: 1d63186ce1e05e86a778340f2d7986c2cee1523de0a11cea39e8d148ac7ee26c49741dfa302b5c1cd1c8d74e67c1f9baee2763720c2d850b57da9a3fdce24565
2020-11-16[upgradewallet] removed unused warning paramSishir Giri
2020-11-16Merge #18836: wallet: upgradewallet fixes and additional testsWladimir J. van der Laan
5f9c0b6360215636cfa62a70d3a70f1feb3977ab wallet: Remove -upgradewallet from dummywallet (MarcoFalke) a314271f08215feba53ead27096ac7fda34acb3c test: Remove unused wallet.dat (MarcoFalke) bf7635963c03203e7189ddaa56c6b086a0108cbf tests: Test specific upgradewallet scenarios and that upgrades work (Andrew Chow) 4b418a9decc3e855ee4b0bbf9e61121c8e9904e5 test: Add test_framework/bdb.py module for inspecting bdb files (Andrew Chow) 092fc434854f881330771a93a1280ac67b1d3549 tests: Add a sha256sum_file function to util (Andrew Chow) 0bd995aa19be65b0dd23df1df571c71428c2bc32 wallet: upgrade the CHDChain version number when upgrading to split hd (Andrew Chow) 8e32e1c41c995e832e643f605d35a7aa112837e6 wallet: remove nWalletMaxVersion (Andrew Chow) bd7398cc6258c258e9f4411c50630ec4a552341b wallet: have ScriptPubKeyMan::Upgrade check against the new version (Andrew Chow) 5f720544f34dedf75b063b962845fa8eca604514 wallet: Add GetClosestWalletFeature function (Andrew Chow) 842ae3842df489f1b8d68e67a234788966218184 wallet: Add utility method for CanSupportFeature (Andrew Chow) Pull request description: This PR cleans up the wallet upgrade mechanism a bit, fixes some probably bugs, and adds more test cases. The `nWalletMaxVersion` member variable has been removed as it made `CanSupportFeature` unintuitive and was causing a couple of bugs. The reason this was introduced originally was to allow a wallet upgrade to only occur when the new feature is first used. While this makes sense for the old `-upgradewallet` option, for an RPC, this does not quite make sense. It's more intuitive for an upgrade to occur if possible if the `upgradewallet` RPC is used as that's an explicit request to upgrade a particular wallet to a newer version. `nWalletMaxVersion` was only relevant for upgrades to `FEATURE_WALLETCRYPT` and `FEATURE_COMPRPUBKEY` both of which are incredibly old features. So for such wallets, the behavior of `upgradewallet` will be that the feature is enabled immediately without the wallet needing to be encrypted at that time (note that `FEATURE_WALLETCRYPT` indicates support for encryption, not that the wallet is encrypted) or for a new key to be generated. `CanSupportFeature` would previously indicate whether we could upgrade to `nWalletMaxVersion` not just whether the current wallet version supported a feature. While this property was being used to determine whether we should upgrade to HD and HD chain split, it was also causing a few bugs. Determining whether we should upgrade to HD or HD chain split is resolved by passing into `ScriptPubKeyMan::Upgrade` the version we are upgrading to and checking against that. By removing `nWalletMaxVersion` we also fix a bug where you could upgrade to HD chain split without the pre-split keypool. `nWalletMaxVersion` was also the version that was being reported by `getwalletinfo` which meant that the version reported was not always consistent across restarts as it depended on whether `upgradewallet` was used. Additionally to make the wallet versions consistent with actually supported versions, instead of just setting the wallet version to whatever is given to `upgradewallet`, we normalize the version number to the closest supported version number. For example, if given 150000, we would store and report 139900. Another bug where CHDChain was not being upgraded to the version supporting HD chain split is also fixed by this PR. Lastly several more tests have been added. Some refactoring to the test was made to make these tests easier. These tests check specific upgrading scenarios, such as from non-HD (version 60000) to HD to pre-split keypool. Although not specifically related to `upgradewallet`, `UpgradeKeyMetadata` is now being tested too. Part of the new tests is checking that the wallet files are identical before and after failed upgrades. To facilitate this, a utility function `sha256sum_file` has been added. Another part of the tests is to examine the wallet file itself to ensure that the records in the wallet.dat file have been correctly modified. So a new `bdb.py` module has been added to deserialize the BDB db of the wallet.dat file. This format isn't explicitly documented anywhere, but the code and comments in BDB's source code in file `dbinc/db_page.h` describe it. This module just dumps all of the fields into a dict. ACKs for top commit: MarcoFalke: approach ACK 5f9c0b6360 laanwj: Code review ACK 5f9c0b6360215636cfa62a70d3a70f1feb3977ab jonatack: ACK 5f9c0b6360215636cfa62a70d3a70f1feb3977ab, approach seems fine, code review, only skimmed the test changes but they look well done, rebased on current master, debug built and verified the `wallet_upgradewallet.py` test runs green both before and after running `test/get_previous_releases.py -b v0.19.1 v0.18.1 v0.17.2 v0.16.3 v0.15.2` Tree-SHA512: 7c4ebf420850d596a586cb6dd7f2ef39c6477847d12d105fcd362abb07f2a8aa4f7afc5bfd36cbc8b8c72fcdd1de8d2d3f16ad8e8ba736b6f4f31f133fe5feba
2020-11-14Add missing optional.h includeKristaps Kaupe
2020-11-14Silence false positive GCC warningKristaps Kaupe
2020-11-12fix potential devision by 0Jonas Schnelli
2020-11-12wallet: override minfee checks (fOverrideFeeRate) for fee_rateJon Atack
in RPCs fundrawtransaction and walletcreatefundedpsbt only. This provides the existing feeRate (BTC/kvB) behavior in these two RPCs to the new fee_rate (sat/vB) param also. See these two GitHub review discussions for more info: https://github.com/bitcoin/bitcoin/pull/10706/#discussion_r126560525 https://github.com/bitcoin/bitcoin/pull/20305#discussion_r520032533
2020-11-12wallet: update sendtoaddress, send RPC examples with fee_rateJon Atack
2020-11-12wallet: use MIN_RELAY_TX_FEE in bumpfee helpJon Atack
Co-authored-by: Murch <murch@murch.one>
2020-11-12wallet: provide valid values if invalid estimate mode passedJon Atack
Co-authored-by: Murch <murch@murch.one>
2020-11-12wallet: update remaining rpcwallet fee rate units to BTC/kvBJon Atack
2020-11-12wallet: update fee rate units, use sat/vB for fee_rate error messagesJon Atack
and BTC/kvB for feeRate error messages.
2020-11-12Remove references to CreateWalletFromFilefanquake
CWallet::CreateWalletFromFile() was removed in 8b5e7297c02f3100a9cb27bfe206e3fc617ec173 but these references remain.
2020-11-12Merge #19502: Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file ↵Samuel Dobson
checks 24d2d3341d07509ad3f37bb6f130446ad20ac807 QA: wallet_multiwallet: Check that recursive symlink directory and wallet.dat loops are ignored (Luke Dashjr) 69f59af54d15ee9800d5df86bcdb0e962c71e7c3 Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file checks (Luke Dashjr) Pull request description: Previously, an exception would be thrown, which could kill the node in some circumstances. Includes test changes to cause failure. Review with `?w=1` ACKs for top commit: hebasto: re-ACK 24d2d3341d07509ad3f37bb6f130446ad20ac807, rebased only since my [previous](https://github.com/bitcoin/bitcoin/pull/19502#pullrequestreview-520552944) review. promag: Tested ACK 24d2d3341d07509ad3f37bb6f130446ad20ac807, test change fails on master. meshcollider: utACK 24d2d3341d07509ad3f37bb6f130446ad20ac807 Tree-SHA512: f701f81b3aa3d3e15cee52ac9e7c31a73c0d8166e56bf077235294507cbcee099829fedc432a1c4b6d8780885f4e37897b44b980b08125771de3c849c000499e
2020-11-11Merge #20344: wallet: fix scanning progress calculation for single block rangeMarcoFalke
5e146022daa4336de94447e5b8e5418296286927 wallet: fix scanning progress calculation for single block range (Sebastian Falbesoner) Pull request description: If the blockchain is rescanned for a single block (i.e. start and stop hashes are equal, and with that also the estimated start/stop verification progress values) the progress calculation could lead to a NaN value caused by a division by zero (0.0/0.0), resulting in an invalid JSON result for the `getwalletinfo` RPC. This PR fixes this behaviour by setting the progress to zero in that special case. Fixes #20297. The behaviour can easily be reproduced by continuously running single block rescans in an endless loop, e.g. via ```bash #!/bin/bash while true do bitcoin-cli rescanblockchain $(bitcoin-cli getblockcount) done ``` and at the same time perform some `getwalletinfo` RPCs. On the master branch, this leads to frequent invalid responses (tested on mainchain): ``` $ bitcoin-cli getwalletinfo error: couldn't parse reply from server $ curl --user `cat ~/.bitcoin/.cookie` --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getwalletinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ {"result":{"walletname":"","walletversion":169900,"format":"bdb","balance":0.00000000,"unconfirmed_balance":0.00000000,"immature_balance":0.00000000,"txcount":0,"keypoololdest":1603677276,"keypoolsize":1000,"hdseedid":"3196e33ecb47c7130e6ca60f2f895f9259860dca","keypoolsize_hd_internal":1000,"paytxfee":0.00000000,"private_keys_enabled":true,"avoid_reuse":false,"scanning":{"duration":0,"progress":},"descriptors":false},"error":null,"id":"curltest"} ``` (note that missing value for "progress" in the JSON result). On the PR branch, the behaviour doesn't occur anymore. ACKs for top commit: MarcoFalke: review ACK 5e146022daa4336de94447e5b8e5418296286927 promag: Core review ACK 5e146022daa4336de94447e5b8e5418296286927. Tree-SHA512: f0e6aad5a6cd08b36c5fe820fff0ef26663229b39169a4dbe757f3c795a41cf5c69c9dc90efe7515675ae1059307f8971123781a0514d10704123a6f28b125ab
2020-11-11wallet: remove fee rates from conf_target helpsJon Atack
2020-11-11wallet: add fee_rate unit warnings to bumpfeeJon Atack
2020-11-11wallet: remove redundant bumpfee fee_rate checksJon Atack
SetFeeEstimateMode() handles these checks now and provides a more actionable error message.
2020-11-11wallet: introduce fee_rate (sat/vB) param/optionJon Atack
Create a fee_rate (sat/vB) RPC param and replace overloading the conf_target and estimate_mode params in the following 6 RPCs with it: - sendtoaddress - sendmany - send - fundrawtransaction - walletcreatefundedpsbt - bumpfee In RPC bumpfee, the previously existing fee_rate remains but the unit is changed from BTC/kvB to sat/vB. This is a breaking change, but it should not be an overly risky one, as the units change by a factor of 1e5 and any fees specified in BTC/kvB after this commit will either be too low and raise an error or be 1 sat/vB and can be RBFed. Update the test coverage for each RPC. Co-authored-by: Murch <murch@murch.one>
2020-11-11wallet: remove unneeded WALLET_BTC_KB_TO_SAT_B constantJon Atack
2020-11-11wallet: fix bug in RPC send optionsJon Atack
when empty, options were not being populated by arguments of the same name found while adding test coverage in 603c0050
2020-11-11wallet: fix scanning progress calculation for single block rangeSebastian Falbesoner
If the blockchain is rescanned for a single block (i.e. start and stop hashes are equal, and with that also the estimated verification progress) the progress calculation could lead to a NaN value caused by a division by zero, resulting in an invalid JSON result for the getwalletinfo RPC. Fixed by setting the progress to zero in that special case. Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2020-11-09Merge #20153: wallet: do not import a descriptor with hardened derivations ↵Wladimir J. van der Laan
into a watch-only wallet 538be4219ae7e65862e4aff540af88c9421e6061 wallet: fix importdescriptor silent fail (Ivan Metlushko) Pull request description: Currently `importdescriptor` command will successfully import a descriptor with hardened derivations into a watch-only wallet while silently failing to expand the descriptor to fill the cache. This leads to a broken wallet state and failure to load such wallet due to missing cache on subsequent restart. ACKs for top commit: laanwj: Code review ACK 538be4219ae7e65862e4aff540af88c9421e6061 achow101: ACK 538be4219ae7e65862e4aff540af88c9421e6061 meshcollider: utACK 538be4219ae7e65862e4aff540af88c9421e6061 Tree-SHA512: 4bdd0ab4437d55b3f1a79c3a300a0b186089155c020fe220a73d0cce274de47d90371d88918d39fd795f9fccf8db328f1e322d29a6062f9ce94a1c254398f004
2020-11-09Merge #20266: wallet: fix change detection of imported internal descriptorsWladimir J. van der Laan
bd93fc9945bfd4be117990c5d861f61ddd451f96 Fix change detection of imported internal descriptors (Andrew Chow) Pull request description: Import internal descriptors were having address book entries added which meant they would be detected as non-change. Fix this and add a test for it. ACKs for top commit: laanwj: Code review ACK bd93fc9945bfd4be117990c5d861f61ddd451f96 meshcollider: utACK bd93fc9945bfd4be117990c5d861f61ddd451f96 promag: Code review ACK bd93fc9945bfd4be117990c5d861f61ddd451f96. Tree-SHA512: 8fa9e364be317627ec171eedffdb505976c0e7f1e55bc7e8cfdffa3aeea5db24d231f55166602cd0e97a5ba621acc871de0a765c75d0c65678f83e93c3b657c5
2020-11-06Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file checksLuke Dashjr
2020-11-05wallet: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabaseMarcoFalke
2020-11-05Set bilingual error completelyHennadii Stepanov
2020-11-05Merge #20199: wallet: ignore (but warn) on duplicate -wallet parametersMarcoFalke
58cfbc38e040925b51cb8d35d23b50e9cf06fb2a Ignoring (but warn) on duplicate -wallet parameters (Jonas Schnelli) Pull request description: I expect that there are many users with load on startup wallet definitions in `bitcoin.conf` or via startup CLI argument. With the new `settings.json` r/w configuration file, users unloading and loading a wallet through the GUI or via the RPC calls might end up with a duplicate `-wallet` entry (one that still remains in bitcoin.conf or CLI) plus the new duplication in `settings.json` due to the unload/load. Steps to reproduce * create wallet (if via RPC set `load_on_startup` or unloadwallet/loadwallet then set `load_on_startup`). * stop bitcoin * start bitcoind again with same `--wallet=mywallet` I guess it is acceptable to skip duplicates. ACKs for top commit: achow101: Tested ACK 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a meshcollider: Code review ACK 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a ryanofsky: Code review ACK 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a. Changes since previous review: rebased, tweaked warning message, squashed/fixed test Tree-SHA512: f94e5a999bdd7dc291f0bc142911b0a8033929350d6f6a35b58c4a06a3c8f83147be0f0c402d4e946dedbbcc85b7e023b672c731b6d7a8984d4780017c961cfb