elements/src/wallet
MarcoFalke 69f1ee1922
Merge #20365: wallettool: add parameter to create descriptors wallet
173cc9b7be test: walettool create descriptors (Ivan Metlushko)
345e88eecf wallettool: add param to create descriptors wallet (Ivan Metlushko)
6d3af3ab62 wallettool: pass in DatabaseOptions into MakeWallet (Ivan Metlushko)

Pull request description:

  Rationale: expose and promote descriptor wallets in more places; make cli tool more consistent with `createwallet` rpc.

  Add `-descriptors` parameter which is off by default. When specified it will create a new descriptors wallet with sqlite backend, which is consistent with `createwallet` rpc.

  This PR is based on a suggestion from **ryanofsky** https://github.com/bitcoin/bitcoin/pull/19137#discussion_r516779603

  Example:
  ```
  $ ./src/bitcoin-wallet  -wallet=fewty -descriptors create
  Topping up keypool...
  Wallet info
  ===========
  Name: fewty
  Format: sqlite
  Descriptors: yes
  Encrypted: no
  HD (hd seed available): yes
  Keypool Size: 6000
  Transactions: 0
  Address Book: 0
  ```
  ```
  $ ./src/bitcoin-wallet  -wallet=fewty create
  Topping up keypool...
  Wallet info
  ===========
  Name: fewty
  Format: bdb
  Descriptors: no
  Encrypted: no
  HD (hd seed available): yes
  Keypool Size: 2000
  Transactions: 0
  Address Book: 0
  ```

ACKs for top commit:
  achow101:
    ACK 173cc9b7be
  ryanofsky:
    Code review ACK 173cc9b7be. This seems pretty nicely implemented now, with opportunities to clean up more and dedup later
  MarcoFalke:
    Concept ACK 173cc9b7be 🌠

Tree-SHA512: cc32ba336ff709de2707ee15f495b4617908e8700ede8401a58e894f44cda485c544d644023c9a6604d88a62db9d92152383ee2e8abf691688c25cf6e222c622
2020-12-16 17:43:20 +01:00
..
test Merge #20275: wallet: List all wallets in non-SQLite and non-BDB builds 2020-12-12 09:20:11 +01:00
bdb.cpp refactor: Consolidate redundant wallet database path and exists functions 2020-12-04 11:03:28 -04:00
bdb.h refactor: Consolidate redundant wallet database path and exists functions 2020-12-04 11:03:28 -04:00
coincontrol.cpp [rpc] walletcreatefundedpsbt: don't automatically append inputs 2020-03-12 13:07:17 +01:00
coincontrol.h [rpc] walletcreatefundedpsbt: don't automatically append inputs 2020-03-12 13:07:17 +01:00
coinselection.cpp Refactor OutputGroups to handle effective values, fees, and filtering 2020-08-11 14:25:02 -04:00
coinselection.h Refactor OutputGroups to handle effective values, fees, and filtering 2020-08-11 14:25:02 -04:00
context.cpp Remove g_rpc_chain global 2020-05-28 02:13:19 -04:00
context.h wallet: Pass unused args to StartWallets 2020-07-09 13:07:37 +02:00
crypter.cpp Fix occurences of c_str() used with size() to data() 2019-10-28 13:41:45 +01:00
crypter.h Convert wallet to new serialization 2020-05-24 10:34:52 -07:00
db.cpp wallet: List all wallets in non-SQLite or non-BDB builds 2020-12-04 11:03:28 -04:00
db.h refactor: Consolidate redundant wallet database path and exists functions 2020-12-04 11:03:28 -04:00
feebumper.cpp Remove unused and confusing CTransaction constructor 2020-12-07 14:59:33 +01:00
feebumper.h wallet: Avoid translating RPC errors when creating txs 2020-05-01 07:39:06 -04:00
fees.cpp Remove unused includes 2019-10-15 22:56:43 +00:00
fees.h
init.cpp Do not compile BDB things when USE_BDB is defined 2020-11-18 11:56:08 -05:00
interfaces.cpp Merge #20275: wallet: List all wallets in non-SQLite and non-BDB builds 2020-12-12 09:20:11 +01:00
ismine.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
load.cpp Ignoring (but warn) on duplicate -wallet parameters 2020-11-03 12:06:32 +01:00
load.h Do not create default wallet 2020-09-08 21:02:53 -04:00
rpcdump.cpp Merge #20153: wallet: do not import a descriptor with hardened derivations into a watch-only wallet 2020-11-09 20:19:00 +01:00
rpcwallet.cpp Merge #20275: wallet: List all wallets in non-SQLite and non-BDB builds 2020-12-12 09:20:11 +01:00
rpcwallet.h Assert that RPCArg names are equal to CRPCCommand ones (net, rpcwallet) 2020-09-22 20:49:30 +02:00
salvage.cpp refactor: Drop call to GetWalletEnv in wallet salvage code 2020-12-04 11:03:28 -04:00
salvage.h wallettool: Have RecoverDatabaseFile return errors and warnings 2020-07-26 20:22:45 -04:00
scriptpubkeyman.cpp Merge #20403: wallet: upgradewallet fixes, improvements, test coverage 2020-11-25 12:46:27 +01:00
scriptpubkeyman.h refactor: Improve use of explicit keyword 2020-12-01 18:36:39 +01:00
sqlite.cpp refactor: Consolidate redundant wallet database path and exists functions 2020-12-04 11:03:28 -04:00
sqlite.h refactor: Consolidate redundant wallet database path and exists functions 2020-12-04 11:03:28 -04:00
wallet.cpp Merge #20588: Remove unused and confusing CTransaction constructor 2020-12-13 10:36:22 +08:00
wallet.h Merge #19980: refactor: Some wallet cleanups 2020-12-02 08:23:00 +08:00
walletdb.cpp refactor: Consolidate redundant wallet database path and exists functions 2020-12-04 11:03:28 -04:00
walletdb.h Include wallet/bdb.h where it is actually being used 2020-11-18 11:55:43 -05:00
wallettool.cpp Merge #20365: wallettool: add parameter to create descriptors wallet 2020-12-16 17:43:20 +01:00
wallettool.h wallet: Remove path checking code from bitcoin-wallet tool 2020-09-03 12:24:32 -04:00
walletutil.cpp MOVEONLY: Move IsBDBFile, IsSQLiteFile, and ListWalletDir 2020-12-04 11:03:28 -04:00
walletutil.h refactor: Replace ListWalletDir() function with ListDatabases() 2020-12-04 11:03:28 -04:00