Reserve only one network specific cached path per session #4803

pull jtimon wants to merge 1 commits into bitcoin:master from jtimon:pathcached changing 1 files +3 −7
  1. jtimon commented at 10:07 pm on August 31, 2014: contributor
    One cannot change the network without restarting, so the only positions in the array that are used are the network you selected and CBaseChainParams::MAX_NETWORK_TYPES. Let’s simplify and just have positions 0 and 1.
  2. Reserve only one network specific cached path per session b4ad217d8f
  3. BitcoinPullTester commented at 10:21 pm on August 31, 2014: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4803_b4ad217d8f6e9beb5268e27ba77a105a20a7f2f4/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
  4. laanwj commented at 8:00 am on September 1, 2014: member

    Looks good to me but you should very carefully test this. The datadir determination is extremely brittle code.

    Many times, changes such as this have broken something like ‘Set the datadir in bitcoin.conf’ or Set the network in bitcoin.conf. Also be sure to test with both the GUI and bitcoind as they have different initialization sequences.

  5. jtimon commented at 9:26 am on September 1, 2014: contributor
    Ok, I though this could be controversial and that’s why I separated it. I’ll test this within #4804 Closing.
  6. jtimon closed this on Sep 1, 2014

  7. jtimon deleted the branch on Sep 1, 2014
  8. laanwj commented at 9:53 am on September 1, 2014: member

    The datadir stuff is really overdue for a cleaner rewrite.

    The caching makes little sense here in the first place. It should simply compute the directory (once!) and store it when the datadir (and the network, for the specific dir) is set, instead of computing it when it is requested and then caching. But this means having to properly define the initialization order :-)

    I’ve postponed this myself as this requires a comprehensive test plan first (what are people actually using?). And well, it works* and there are zillions of more serious issues.

    • There are some issues such as #3639 that could be solved here
  9. jtimon commented at 0:52 am on September 2, 2014: contributor
    Btw, I know @gmaxwell is interested in removing worthless caching lately…
  10. 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: 2024-11-17 15:12 UTC

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