0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-06 10:18:44 -05:00
bitcoin-bitcoin-core/src/wallet/test
Wladimir J. van der Laan efb6ddef9c
Merge #11911: Free BerkeleyEnvironment instances when not in use
14bc2a17dd Trivial: add doxygen-compatible comments relating to BerkeleyEnvironment (Pierre Rochard)
88b1d956fe Tests: add unit tests for GetWalletEnv (Pierre Rochard)
f1f4bb7345 Free BerkeleyEnvironment instances when not in use (Russell Yanofsky)

Pull request description:

  Instead of adding BerkeleyEnvironment objects permanently to the g_dbenvs map, use reference counted shared pointers and remove map entries when the last BerkeleyEnvironment reference goes out of scope.

  This change was requested by @TheBlueMatt and makes code that sets up mock databases cleaner. The mock database environment will now go out of scope and be reset on destruction so there is no need to call BerkeleyEnvironment::Reset() during wallet construction to clear out prior state.

  This change does affect bitcoin behavior slightly. On startup, instead of same wallet environments staying open throughout VerifyWallets() and OpenWallets() calls, VerifyWallets() will open and close an environment once for each wallet, and OpenWallets() will create its own environment(s) later.

Tree-SHA512: 219d77a9e2268298435b86088f998795e059fdab1d2050ba284a9ab8d8a44961c9b5cf96e94ee521688108d23c6db680e3e3a999b8cb2ac2a8590f691d50668b
2019-01-31 18:05:24 +01:00
..
coinselector_tests.cpp Pass chain and client variables where needed 2018-11-06 11:44:40 -04:00
db_tests.cpp Tests: add unit tests for GetWalletEnv 2018-11-26 12:20:35 -04:00
init_test_fixture.cpp Remove direct node->wallet calls in init.cpp 2018-11-06 11:44:40 -04:00
init_test_fixture.h Remove direct node->wallet calls in init.cpp 2018-11-06 11:44:40 -04:00
init_tests.cpp Remove direct node->wallet calls in init.cpp 2018-11-06 11:44:40 -04:00
psbt_wallet_tests.cpp Merge #14588: Refactor PSBT signing logic to enforce invariant and fix signing bug 2018-11-09 19:43:09 -08:00
wallet_crypto_tests.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
wallet_test_fixture.cpp Pass chain and client variables where needed 2018-11-06 11:44:40 -04:00
wallet_test_fixture.h Pass chain and client variables where needed 2018-11-06 11:44:40 -04:00
wallet_tests.cpp Convert CWallet::ScanForWalletTransactions and SyncTransaction to the new Chain apis 2019-01-15 08:42:00 -08:00