init: Remove boost from ThreadImport#18786
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Concept ACK |
|
Open-Close to re-run ci. See #15847 (comment) |
| if (nLoaded > 0) | ||
| LogPrintf("Loaded %i blocks from external file in %dms\n", nLoaded, GetTimeMillis() - nStart); | ||
| return nLoaded > 0; | ||
| LogPrintf("Loaded %i blocks from external file in %dms\n", nLoaded, GetTimeMillis() - nStart); |
There was a problem hiding this comment.
This change adds log entry if nLoaded == 0. Is it intentional?
There was a problem hiding this comment.
Yes. LoadExternalBlockFile is only called when files are actually read. If nLoaded is zero, something has gone wrong and we should be verbose about that.
| if (ShutdownRequested()) { | ||
| LogPrintf("Shutdown requested. Exit %s\n", __func__); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Shouldn't this block be outside of the if ... else ... statement?
There was a problem hiding this comment.
why? That would be a slight behaviour change. Previously, we'd also loop over invalid files until the first valid file is found and then check for interruption. I don't think it matters much in any case.
|
Code review ACK faec3dc |
faec3dc init: Remove boost from ThreadImport (MarcoFalke) Pull request description: Can be tested by calling `-reindex` or `-loadblock` and then pressing `CTRL`+`C`. Should print something like: ``` ... 2020-04-27T19:34:31Z [loadblk] Reindexing block file blk00005.dat... ^C2020-04-27T19:34:32Z [loadblk] Shutdown requested. Exit ThreadImport 2020-04-27T19:34:32Z [qt-init] Interrupting HTTP server ... ``` ACKs for top commit: laanwj: Code review ACK faec3dc hebasto: ACK faec3dc, tested on Linux Mint 19.3 (x86_64) both `bitcoind` and `bitcoin-qt` binaries. Tree-SHA512: e105af18d98296d82ec99f48e478cf44577e3c32f7e4b47617a7bc7cbf71d6becb92722f229a1be38d58ad29712704509ad9740d8ab8cd3104cf90057664b437
Summary: > Can be tested by calling -reindex or -loadblock and then pressing CTRL+C. > > Should print something like: > > ``` > ... > 2020-04-27T19:34:31Z [loadblk] Reindexing block file blk00005.dat... > ^C2020-04-27T19:34:32Z [loadblk] Shutdown requested. Exit ThreadImport > 2020-04-27T19:34:32Z [qt-init] Interrupting HTTP server > ... > ``` This is a backport of Core [[bitcoin/bitcoin#18786 | PR18786]] Test Plan: `ninja all check-all` Run ` src/bitcoind -reindex`, stop the programs with Ctrl+C (and painfully reindex the whole chain) Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9072
merge bitcoin#13671, bitcoin#17405, bitcoin#18786, bitcoin#18792, bitcoin#20067: Deboostification
Can be tested by calling
-reindexor-loadblockand then pressingCTRL+C.Should print something like: