aboutsummaryrefslogtreecommitdiff
path: root/src/shutdown.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-01-31 18:01:30 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2019-01-31 18:05:24 +0100
commitefb6ddef9cb341428cbedf4373d1bdd19685a827 (patch)
tree15b9fecf5e60947c1a59a9765daa804ec82677dc /src/shutdown.h
parent252fd15addf1cd061c3b6258ad916df7deeecf83 (diff)
parent14bc2a17dd03ccd89f65a302328763ff22c710c2 (diff)
Merge #11911: Free BerkeleyEnvironment instances when not in use
14bc2a17dd03ccd89f65a302328763ff22c710c2 Trivial: add doxygen-compatible comments relating to BerkeleyEnvironment (Pierre Rochard) 88b1d956fe3e38f2d2dd805feee9dadb0be9e8a9 Tests: add unit tests for GetWalletEnv (Pierre Rochard) f1f4bb7345b90853ec5037478173601035593d26 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
Diffstat (limited to 'src/shutdown.h')
0 files changed, 0 insertions, 0 deletions