Two minor inconvenience fixes #2074

Merged
merged 2 commits into from Dec 12, 2012

Conversation

Projects
None yet
5 participants
Owner

sipa commented Dec 4, 2012

Nothing large, this fixes two minor inconveniences. See the commit messages for more information.

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/69e42e7d03fe7115b345ee0cd4f2a869941f4bbc for binaries and test log.

Diapolo commented Dec 5, 2012

ACK

Edit: @sipa Can you please take a look at #2063 and #2068 as I consider them "minor", too :).

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/f00687beada5622efc9b565aa5cee84659e13c0f for binaries and test log.

@laanwj laanwj commented on the diff Dec 6, 2012

src/main.cpp
@@ -1240,9 +1240,12 @@ bool ConnectBestBlock() {
if (pindexTest->pprev == NULL || pindexTest->pnext != NULL) {
reverse(vAttach.begin(), vAttach.end());
- BOOST_FOREACH(CBlockIndex *pindexSwitch, vAttach)
+ BOOST_FOREACH(CBlockIndex *pindexSwitch, vAttach) {
+ if (fRequestShutdown)
@laanwj

laanwj Dec 6, 2012

Owner

I suppose we should declare fRequestShutdown as volatile, as a sufficiently smart compiler will decide to move this statement out of the loop, as it doesn't depend on the loop invariants in any way (not expecting other threads to modify it).

@sipa

sipa Dec 6, 2012

Owner

Done.

sipa added some commits Dec 4, 2012

@sipa sipa Update the block file counter in database when using -reindex
This problem is like earth (mostly harmless). After/during a
-reindex, it means the statistics about the last block file
reported in debug.log are always of blk00000.dat instead of the
last file. Apart from that, it means a few more database entries
need to be read when finding a file to append to the first time.
c8b2e44
@sipa sipa Allow lengthy block reconnections to be interrupted
When the coin database is out of date with the block database, the
best block in it is automatically switched to. This reconnection
process can take time, so allow it to be interrupted.

This also stops block connection as soon as shutdown is requested,
leading to a faster shutdown.
3fb9b99

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/3fb9b99cca390e8ac5838c03363c46a99396e463 for binaries and test log.

Owner

laanwj commented Dec 7, 2012

ACK

@gavinandresen gavinandresen added a commit that referenced this pull request Dec 12, 2012

@gavinandresen gavinandresen Merge pull request #2074 from sipa/minor
Two minor inconvenience fixes
8b83e2f

@gavinandresen gavinandresen merged commit 8b83e2f into bitcoin:master Dec 12, 2012

sipa deleted the sipa:minor branch May 3, 2013

@laudney laudney pushed a commit to reddcoin-project/reddcoin that referenced this pull request Mar 19, 2014

@gavinandresen gavinandresen Merge pull request #2074 from sipa/minor
Two minor inconvenience fixes
398b2cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment