0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-09 15:37:00 -04:00
bitcoin-core/src/wallet
Wladimir J. van der Laan afa506f6eb
Merge #14552: wallet: detecting duplicate wallet by comparing the db filename.
591203149f wallet: Create IsDatabaseLoaded function (Chun Kuan Lee)
15c93f075a wallet: Add trailing wallet.dat when detecting duplicate wallet if it's a directory. (Chun Kuan Lee)
c456fbd8df Refactor: Move m_db pointers into BerkeleyDatabase (Russell Yanofsky)

Pull request description:

  Fix #14538

  Fix crash attempting to load the same wallet with different path strings that resolve to the same absolute path. The primary check which prevents loading the same wallet twice is:

  6b8d0a2164/src/wallet/db.cpp (L44)

  But this check is skipped if both wallet paths resolve to the same absolute path, due to caching here:

  6b8d0a2164/src/wallet/db.cpp (L467)

  Meanwhile a secondary check for duplicate wallets is not reliable because it based on a literal comparison, instead of comparison using absolute paths:

  6b8d0a2164/src/wallet/wallet.cpp (L3853)

  This PR fixes the latter check to compare the absolute path of a new wallet being loaded to absolute paths of wallets already loaded, so there should no longer be any way to load the same wallet more than once.

Tree-SHA512: 2fa01811c160b57be3b76c6b4983556a04bbce71a3f8202429987ec020664a062e897deedcd9248bc04e9baaa2fc7b464e2595dcaeff2af0818387bf1fcdbf6f
2018-11-20 15:15:59 +01:00
..
test Merge #14588: Refactor PSBT signing logic to enforce invariant and fix signing bug 2018-11-09 19:43:09 -08:00
coincontrol.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
coincontrol.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
coinselection.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
coinselection.h amount: Move CAmount CENT to unit test header 2018-09-17 14:34:56 -04:00
crypter.cpp Merge #14478: Show error to user when corrupt wallet unlock fails 2018-11-14 11:27:01 -05:00
crypter.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
db.cpp wallet: Create IsDatabaseLoaded function 2018-11-08 11:54:37 +08:00
db.h wallet: Create IsDatabaseLoaded function 2018-11-08 11:54:37 +08:00
feebumper.cpp Pass chain locked variables where needed 2018-11-06 11:44:40 -04:00
feebumper.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
fees.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
fees.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
init.cpp Remove direct node->wallet calls in init.cpp 2018-11-06 11:44:40 -04:00
rpcdump.cpp Merge #14720: rpc: Correctly name arguments 2018-11-13 16:49:23 -05:00
rpcwallet.cpp Rename ListTransactions filter variable 2018-11-13 16:49:23 -05:00
rpcwallet.h Simplify arguments to SignPSBTInput 2018-11-01 12:11:24 -07:00
wallet.cpp Merge #14552: wallet: detecting duplicate wallet by comparing the db filename. 2018-11-20 15:15:59 +01:00
wallet.h Pass chain locked variables where needed 2018-11-06 11:44:40 -04:00
walletdb.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
walletdb.h [wallet] Kill accounts 2018-08-30 16:08:42 +02:00
walletutil.cpp Merge #14350: Add WalletLocation class 2018-11-05 13:17:03 +01:00
walletutil.h wallet: Add WalletLocation utility class 2018-10-25 11:53:17 +01:00