- removes the need for a boost::filesystem::path field, which caused issues on shutdown because of a static initialized internal pointer
See #6282, which is why I choose to open this pull.
- removes the need for a boost::filesystem::path field, which caused
issues on shutdown because of a static initialized internal pointer
Magic! I just was writing a CBanDB (ban list disk store) and where thinking about the same change for CAddrDB. But i would have done it differently.
Why not keeping the constructor and creating the temp file by adding the random number to pathAddr?
After your PR we would have multiples of "peers.dat".
This is only relevant for structures defined at a global level. AddrDB isn't.
Are you sure this is causing a problem? Are you still experiencing crashes after #6282?
IMO we should be switching to controlled lifetime for such global db objects, instead, That's a less fragile solution than randomly nuking usages of boost::path in classes in the oft case they give problems at the end of the program.
There is no need for this change, closing.
I thought it would be nice to not need to store the path ;)... well, I'm fine with getting it rejected.