- a reindex is not considered to be also an import anymore (we already seperate these 2 states in the GUI and I think it makes sense in the core, too)
distinguish reindexing from importing #2226
pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:reindex_vs_importing changing 3 files +7 −7-
Diapolo commented at 9:18 PM on January 27, 2013: none
-
0a5342e2c0
distinguish reindexing from importing
- a reindex is not considered to be also an import anymore (we already seperate these 2 states in the GUI and I think it makes sense in the core, too)
-
sipa commented at 9:23 PM on January 27, 2013: member
I have no idea what you're doing.
-
Diapolo commented at 9:26 PM on January 27, 2013: none
Hey wow and I had no alcohol... okay, the GUI has 2 states, BLOCK_SOURCE_DISK for importing and BLOCK_SOURCE_REINDEX for reindexing. The core currently always sets fReindex and fImporting, when doing a reindex right? This pull changes this so we can differentiate these 2, that is all.
Edit: Oh yeah and it moves a
nBestHeight < Checkpoints::GetTotalBlocksEstimate()to the end of an if-clause as micro-optimisation. -
BitcoinPullTester commented at 9:37 PM on January 27, 2013: none
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/0a5342e2c00706a37d85a967f71de8acd213bc13 for binaries and test log.
-
sipa commented at 9:48 PM on January 27, 2013: member
I don't think that's what you're doing. I haven't tried, but I think this will cause a node to start IBD during reindexing or importing, as (!fReindex || !fImporting) is always true. So, to do what you want, those boolean conditions in the core testing for shouldn't be touched.
I'm not sure it's safe to not set fImporting during reindex, though. It is not true that (in the current code) fReindex implies fImporting (fReindex just signifies that a reindex should be done; fImporting is only set while it is running). I think it's safer to keep the code as it is.
-
Diapolo commented at 9:53 PM on January 27, 2013: none
Seems my brain messed that up, so just closing this without further discussion-need ^^. Thanks for your time...
- Diapolo closed this on Jan 27, 2013
- DrahtBot locked this on Sep 8, 2021