aboutsummaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2018-05-18 16:28:50 -0400
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-03-12 23:24:11 +0000
commitf22d02f5371efcaa48a8d5d1b8cd31c65d8235f3 (patch)
tree428c6fdaffb12f96bb9e028682c9e7f00cc80a97 /COPYING
parent0a9af2d4cb093d254a36d094b8d8ed7603fc9404 (diff)
downloadbitcoin-f22d02f5371efcaa48a8d5d1b8cd31c65d8235f3.tar.xz
Free BerkeleyEnvironment instances when not in use
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 Matt Corallo <git@bluematt.me> 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. Github-Pull: #11911 Rebased-From: f1f4bb7
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions