In my last pull request I started my solution in the GetWalletEnv function which manages access to BerkeleyEnvironment objects. I noticed a comment stating the map will be changed in the future to hold pointers instead of objects. Sure enough, there was a 10 month old pull request to do just that, #11911. I reviewed the code and I added a few comments and unit tests.