Skip to content

Conversation

@jtimon
Copy link
Contributor

@jtimon jtimon commented Aug 31, 2014

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.

@BitcoinPullTester
Copy link

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.

@laanwj
Copy link
Member

laanwj commented Sep 1, 2014

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.

@jtimon
Copy link
Contributor Author

jtimon commented Sep 1, 2014

Ok, I though this could be controversial and that's why I separated it. I'll test this within #4804
Closing.

@jtimon jtimon closed this Sep 1, 2014
@jtimon jtimon deleted the pathcached branch September 1, 2014 09:26
@laanwj
Copy link
Member

laanwj commented Sep 1, 2014

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.

@jtimon
Copy link
Contributor Author

jtimon commented Sep 2, 2014

Btw, I know @gmaxwell is interested in removing worthless caching lately...

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants