remove pathAddr field from CAddrDB class #6308

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:addrdb changing 2 files +5 −9
  1. Diapolo commented at 2:04 PM on June 19, 2015: none
    • 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.

  2. remove pathAddr field from CAddrDB class
    - removes the need for a boost::filesystem::path field, which caused
      issues on shutdown because of a static initialized internal pointer
    fec82f682e
  3. jonasschnelli commented at 2:41 PM on June 19, 2015: contributor

    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".

  4. laanwj commented at 3:04 PM on June 19, 2015: member

    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.

  5. laanwj commented at 3:17 PM on June 19, 2015: member

    There is no need for this change, closing.

  6. laanwj closed this on Jun 19, 2015

  7. Diapolo commented at 7:50 PM on June 19, 2015: none

    I thought it would be nice to not need to store the path ;)... well, I'm fine with getting it rejected.

  8. Diapolo deleted the branch on Jun 19, 2015
  9. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me