bitcoin/src
MarcoFalke ffc4d04990
Merge #20275: wallet: List all wallets in non-SQLite and non-BDB builds
f3d870fc22 wallet: List all wallets in non-SQLite or non-BDB builds (Russell Yanofsky)
d70dc89e78 refactor: Consolidate redundant wallet database path and exists functions (Russell Yanofsky)
6a7a63644c refactor: Drop call to GetWalletEnv in wallet salvage code (Russell Yanofsky)
6ee9cbdd18 refactor: Replace ListWalletDir() function with ListDatabases() (Russell Yanofsky)
5aaeb6cf87 MOVEONLY: Move IsBDBFile, IsSQLiteFile, and ListWalletDir (Russell Yanofsky)

Pull request description:

  This PR does not change behavior when bitcoin is built normally with both the SQLite and BDB libraries. It just makes non-SQLite and non-BDB builds more similar to the normal build. Specifically:

  - It makes wallet directory lists always include all wallets so wallets don't appear missing depending on the build.

  - It now triggers specific "Build does not support SQLite database format" and "Build does not support Berkeley DB database format" errors if a wallet can't be loaded instead of the more ambiguous and scary "Data is not in recognized format" error.

  Both changes are implemented in the last commit. The previous commits are just refactoring cleanups that make the last commit possible and consolidate and reduce code.

ACKs for top commit:
  achow101:
    ACK f3d870fc22
  promag:
    Tested ACK f3d870fc22. Tested a --without-sqlite build with sqlite wallets.

Tree-SHA512: 029ad21559dbc338b5f351d05113c51bc25bce830f4f4e18bcd82287bc528275347a60249da65b91d252632aeb70b25d057bd59c704bfcaafb9f790bc5b59762
2020-12-12 09:20:11 +01:00
..
bench refactor: Replace uses ChainActive() in interfaces/chain.cpp 2020-12-07 09:09:53 -04:00
compat net: Use C++11 member initialization in protocol 2020-05-20 08:27:07 -04:00
config
consensus doc: Move assumed-values doxygen comments to header 2020-10-15 11:28:13 +02:00
crc32c build: Update crc32c subtree 2020-12-08 19:26:30 +01:00
crypto Merge #19845: net: CNetAddr: add support to (un)serialize as ADDRv2 2020-09-28 12:27:08 -07:00
index Merge #19733: Move comment about BaseIndex::DB from TxIndex::DB 2020-08-21 12:48:46 +08:00
interfaces refactor: Get rid of more redundant chain methods 2020-12-07 09:09:53 -04:00
leveldb Update to leveldb upstream using subtree merge 2020-01-28 16:59:07 +01:00
logging Remove use of non-standard zero variadic macros 2020-04-30 18:02:04 +08:00
node Merge #19910: net processing: Move peer_map to PeerManager 2020-12-09 21:56:17 +08:00
policy log: Clarify that failure to read fee_estimates.dat is non-fatal 2020-12-07 14:13:20 +01:00
primitives Report and verify expirations 2020-10-12 12:14:53 -07:00
qt qt/test: [FIX] Add forgotten Context setting in RPCNestedTests 2020-12-08 14:22:43 -05:00
rpc Merge #19776: net, rpc: expose high bandwidth mode state via getpeerinfo 2020-12-10 08:21:36 +01:00
script Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const 2020-12-06 00:22:40 +00:00
secp256k1 Update secp256k1 subtree to latest master 2020-10-27 23:08:48 -07:00
support Move Win32 defines to configure.ac to ensure they are globally defined 2020-08-20 17:55:06 +00:00
test Merge #19858: Periodically make block-relay connections and sync headers 2020-12-11 10:20:01 +01:00
univalue Update univalue subtree 2020-11-19 15:48:24 +01:00
util util: Allow use of C++14 chrono literals 2020-12-08 16:47:36 +01:00
wallet Merge #20275: wallet: List all wallets in non-SQLite and non-BDB builds 2020-12-12 09:20:11 +01:00
zmq zmq: Append address to notify log output 2020-10-01 00:33:38 +02:00
.clang-format tools: clang-format 6 compatibility 2020-07-06 03:52:37 +02:00
addrdb.cpp p2p: Add ReadAnchors() 2020-10-09 14:29:04 +03:00
addrdb.h p2p: Add ReadAnchors() 2020-10-09 14:29:04 +03:00
addrman.cpp [addrman] Specify max addresses and pct when calling GetAddresses() 2020-08-12 09:22:07 +01:00
addrman.h Merge #20291: [net] Consolidate logic around calling CAddrMan::Connected() 2020-11-19 16:30:54 +01:00
amount.h
arith_uint256.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
arith_uint256.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
attributes.h Remove NODISCARD 2020-11-26 09:07:33 +00:00
banman.cpp Ignore incorrectly-serialized banlist.dat entries 2020-10-12 15:35:08 -07:00
banman.h Clean up separated ban/discourage interface 2020-07-03 20:43:55 -07:00
base58.cpp scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
base58.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
bech32.cpp Add some general std::vector utility functions 2019-10-16 08:56:57 -07:00
bech32.h Assert that the HRP is lowercase in Bech32::Encode 2019-09-05 13:25:11 +12:00
bitcoin-cli-res.rc Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
bitcoin-cli.cpp cli -netinfo: print oversized/extreme ping times as "-" 2020-10-25 16:51:21 +01:00
bitcoin-tx-res.rc Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
bitcoin-tx.cpp Warn when binaries are built from a dirty branch. 2020-11-28 18:43:55 -05:00
bitcoin-wallet-res.rc Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
bitcoin-wallet.cpp Warn when binaries are built from a dirty branch. 2020-11-28 18:43:55 -05:00
bitcoind-res.rc Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
bitcoind.cpp Warn when binaries are built from a dirty branch. 2020-11-28 18:43:55 -05:00
blockencodings.cpp Get rid of -Wthread-safety-precise warnings 2020-05-28 09:55:39 +03:00
blockencodings.h Get rid of -Wthread-safety-precise warnings 2020-05-28 09:55:39 +03:00
blockfilter.cpp Make CHash256/CHash160 output to Span 2020-07-30 13:57:54 -07:00
blockfilter.h [indexes] Fix default [de]serialization of BlockFilter. 2020-05-26 17:27:15 -04:00
bloom.cpp scripted-diff: TxoutType C++11 scoped enum class 2020-06-21 06:41:55 -04:00
bloom.h doc: clarify CRollingBloomFilter size estimate 2020-10-01 22:22:56 -07:00
chain.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
chain.h chain: Remove UB CChain comparison 2020-08-27 20:07:27 -04:00
chainparams.cpp Merge #20238: doc: Missing comments for signet parameters 2020-11-16 10:40:56 +01:00
chainparams.h Remove gArgs global from CreateChainParams to aid testing 2020-09-29 10:20:05 +02:00
chainparamsbase.cpp net: Add alternative port for onion service 2020-09-29 09:59:51 +03:00
chainparamsbase.h net, refactor: Refactor CBaseChainParams::RPCPort function 2020-09-29 09:59:52 +03:00
chainparamsseeds.h net: Hardcoded seeds update for 0.21 2020-10-25 14:25:00 +01:00
checkqueue.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
clientversion.cpp Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
clientversion.h Drop the leading 0 from the version number 2020-11-18 12:00:57 -05:00
coins.cpp Add CChainState::ResizeCoinsCaches 2020-07-01 14:44:28 -04:00
coins.h Add CChainState::ResizeCoinsCaches 2020-07-01 14:44:28 -04:00
compat.h net: Drop unneeded Windows headers in compat.h 2020-10-22 21:45:10 +03:00
compressor.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
compressor.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
core_io.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
core_memusage.h
core_read.cpp Improve heuristic hex transaction decoding 2020-12-08 10:11:02 -08:00
core_write.cpp refactor: Avoid duplicate map lookup in ScriptToAsmStr 2020-09-04 10:25:44 +01:00
cuckoocache.h tests: Add fuzzing harness for classes/functions in cuckoocache.h 2020-04-08 14:45:27 +00:00
dbwrapper.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
dbwrapper.h Drop unused CDBWrapper methods 2020-07-08 14:26:14 +03:00
dummywallet.cpp wallet: Remove -upgradewallet from dummywallet 2020-11-04 12:16:57 -05:00
flatfile.cpp
flatfile.h Merge #18317: Serialization improvements step 6 (all except wallet/gui) 2020-05-20 07:30:29 -04:00
fs.cpp Add missing includes to fix compile errors 2020-06-16 15:15:46 -04:00
fs.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
hash.cpp Add TaggedHash function (BIP 340) 2020-10-12 02:06:32 -07:00
hash.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
httprpc.cpp rpc: Validate -rpcauth arguments 2020-11-23 21:02:54 +00:00
httprpc.h refactor: Pass NodeContext to RPC and REST methods through util::Ref 2020-05-13 16:20:13 -04:00
httpserver.cpp net: Drop unneeded headers when compat.h included 2020-10-22 21:45:20 +03:00
httpserver.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
indirectmap.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
init.cpp Simplify and clarify extra outbound peer counting 2020-12-10 08:41:57 -05:00
init.h Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const 2020-12-06 00:22:40 +00:00
key.cpp tests: Add fuzzing harness for ec_seckey_import_der(...) and ec_seckey_export_der(...) 2020-08-18 18:03:57 +00:00
key.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
key_io.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
key_io.h
logging.cpp log: remove deprecated db log category 2020-06-07 17:03:49 +02:00
logging.h refactor: Rename LockGuard to StdLockGuard for consistency with StdMutex 2020-05-28 09:54:24 +03:00
Makefile.am Merge #20494: refactor: Move node and wallet code out of src/interfaces 2020-12-01 09:39:56 +01:00
Makefile.bench.include Add libsqlite3 2020-10-14 11:18:12 -04:00
Makefile.crc32c.include build: Update crc32c subtree 2020-12-08 19:26:30 +01:00
Makefile.leveldb.include build: Enable -Wsuggest-override 2020-05-12 18:03:39 +03:00
Makefile.qt.include Add libsqlite3 2020-10-14 11:18:12 -04:00
Makefile.qt_locale.include qt: Pre-splitoff translations update 2020-10-27 19:40:44 +01:00
Makefile.qttest.include Add libsqlite3 2020-10-14 11:18:12 -04:00
Makefile.test.include Clean up assets test minimizer LDFLAGS 2020-11-26 14:56:25 -08:00
Makefile.test_fuzz.include build: create test_fuzz library from src/test/fuzz/fuzz.cpp 2020-04-05 01:01:13 +02:00
Makefile.test_util.include test: Mock IBD in net_processing fuzzers 2020-11-07 07:50:59 +01:00
memusage.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
merkleblock.cpp Make Hash[160] consume range-like objects 2020-07-30 13:57:54 -07:00
merkleblock.h Convert merkleblock to new serialization 2020-03-30 16:09:51 -07:00
miner.cpp refactor: Remove unused BlockAssembler::pblock member var 2020-06-15 08:08:19 -04:00
miner.h Remove mapLinks in favor of entry inlined structs with iterator type erasure 2020-09-04 09:46:44 -07:00
net.cpp Periodically make block-relay connections and sync headers 2020-12-10 08:46:39 -05:00
net.h Periodically make block-relay connections and sync headers 2020-12-10 08:46:39 -05:00
net_permissions.cpp Reduce MAX_PEER_TX_ANNOUNCEMENTS for non-PF_RELAY peers 2020-10-12 12:14:53 -07:00
net_permissions.h Reduce MAX_PEER_TX_ANNOUNCEMENTS for non-PF_RELAY peers 2020-10-12 12:14:53 -07:00
net_processing.cpp Clarify comments around outbound peer eviction 2020-12-10 08:46:51 -05:00
net_processing.h Periodically make block-relay connections and sync headers 2020-12-10 08:46:39 -05:00
net_types.h refactor: Remove addrdb.h dependency from node.h 2019-10-29 11:30:12 +02:00
netaddress.cpp Break circuit earlier 2020-11-16 15:54:24 -03:00
netaddress.h Merge #20033: refactor: minor whitespace fixups, s/const/constexpr/ and remove template (followup to #19845) 2020-11-16 07:57:34 +01:00
netbase.cpp net: update GetNetworkName() with all enum Network cases 2020-10-15 19:21:38 +02:00
netbase.h net: Avoid using C-style NUL-terminated strings as arguments in the netbase interface 2020-01-08 12:35:59 +00:00
netmessagemaker.h refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg 2020-05-11 00:20:57 +02:00
noui.cpp scripted-diff: Move ui_interface to the node lib 2020-06-27 11:49:28 -04:00
noui.h Make ThreadSafe{MessageBox|Question} bilingual 2020-05-05 04:45:59 +03:00
optional.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
outputtype.cpp Enable Wswitch for OutputType 2020-07-01 18:03:12 -04:00
outputtype.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
pow.cpp
pow.h
prevector.h prevector: Avoid unnamed struct, which is a GNU extension 2020-04-30 18:02:03 +08:00
protocol.cpp Remove unused bits from service flags enum 2020-12-08 18:36:51 +01:00
protocol.h Remove unused bits from service flags enum 2020-12-08 18:36:51 +01:00
psbt.cpp psbt: always put a non_witness_utxo and don't remove it 2020-06-24 16:32:19 -04:00
psbt.h scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD 2020-11-26 09:05:59 +00:00
pubkey.cpp Implement Taproot validation (BIP 341) 2020-10-12 17:17:56 -07:00
pubkey.h refactor: Improve use of explicit keyword 2020-12-01 18:36:39 +01:00
random.cpp Merge #17563: lib: fix a compiler warning: unused GetDevURandom() 2020-08-10 21:30:42 +08:00
random.h Add templated GetRandomDuration<> 2020-04-30 09:19:14 -04:00
randomenv.cpp util: Allow use of C++14 chrono literals 2020-12-08 16:47:36 +01:00
randomenv.h [MOVEONLY] Move perfmon data gathering to new randomenv module 2019-11-12 14:50:44 -08:00
rest.cpp Merge #19849: Assert that RPCArg names are equal to CRPCCommand ones (blockchain,rawtransaction) 2020-09-22 17:08:08 +02:00
reverse_iterator.h
scheduler.cpp clang-format scheduler 2020-06-21 06:02:59 -04:00
scheduler.h clang-format scheduler 2020-06-21 06:02:59 -04:00
serialize.h Support bypassing range check in ReadCompactSize 2020-10-09 10:32:19 +02:00
shutdown.cpp
shutdown.h
signet.cpp refactor: Remove SignetTxs::m_valid and use optional instead 2020-09-22 22:31:31 +02:00
signet.h refactor: Remove SignetTxs::m_valid and use optional instead 2020-09-22 22:31:31 +02:00
span.h Merge #19387: span: update constructors to match c++20 draft spec and add lifetimebound attribute 2020-11-25 15:18:33 +01:00
streams.h net: CAddress & CAddrMan: (un)serialize as ADDRv2 2020-10-09 16:42:49 +02:00
sync.cpp sync: Improve CheckLastCritical() 2020-12-10 20:46:29 +02:00
sync.h [skip ci] sync: Check precondition in LEAVE_CRITICAL_SECTION() macro 2020-12-10 20:46:39 +02:00
threadinterrupt.cpp
threadinterrupt.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
threadsafety.h Drop deprecated and unused GUARDED_VAR and PT_GUARDED_VAR annotations 2020-08-18 10:46:53 +03:00
timedata.cpp Avoid the use of abs64 in timedata 2020-10-12 19:50:16 -07:00
timedata.h
tinyformat.h refactor: Improve use of explicit keyword 2020-12-01 18:36:39 +01:00
torcontrol.cpp net: Add compat.h header for htonl function 2020-10-22 21:45:20 +03:00
torcontrol.h net: Pass onion service target to Tor controller 2020-10-01 19:00:07 +03:00
txdb.cpp Merge #18637: coins: allow cache resize after init 2020-07-29 07:53:19 +02:00
txdb.h txdb: add CCoinsViewDB::ChangeCacheSize 2020-07-01 14:44:24 -04:00
txmempool.cpp refactor: Clean up CTxMemPool initializer list 2020-10-23 14:41:40 +02:00
txmempool.h refactor: Improve use of explicit keyword 2020-12-01 18:36:39 +01:00
txrequest.cpp refactor: Improve use of explicit keyword 2020-12-01 18:36:39 +01:00
txrequest.h Report and verify expirations 2020-10-12 12:14:53 -07:00
uint256.cpp Add txrequest module 2020-10-12 11:01:16 -07:00
uint256.h Add txrequest module 2020-10-12 11:01:16 -07:00
undo.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
validation.cpp Merge #18766: Disable fee estimation in blocksonly mode (by removing the fee estimates global) 2020-12-07 12:59:48 +01:00
validation.h Remove the remaining fee estimation globals 2020-12-03 12:56:37 +01:00
validationinterface.cpp Add 'sequence' zmq publisher to track all block (dis)connects, mempool deltas 2020-09-22 11:34:30 -04:00
validationinterface.h Add 'sequence' zmq publisher to track all block (dis)connects, mempool deltas 2020-09-22 11:34:30 -04:00
version.h net: CNetAddr: add support to (un)serialize as ADDRv2 2020-09-17 22:17:17 +02:00
versionbits.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
versionbits.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
versionbitsinfo.cpp Activate Taproot/Tapscript on regtest (BIP 341, BIP 342) 2020-10-12 17:18:47 -07:00
versionbitsinfo.h
walletinitinterface.h refactor: add unused ArgsManager to replace gArgs 2020-07-29 16:36:44 +07:00
warnings.cpp Remove dead CheckForkWarningConditionsOnNewFork 2020-11-03 14:01:40 +01:00
warnings.h Remove dead CheckForkWarningConditionsOnNewFork 2020-11-03 14:01:40 +01:00