init: Remove boost from ThreadImport #18786

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2004-noBoostInitThreadImport changing 3 files +12 −6
  1. MarcoFalke commented at 7:36 pm on April 27, 2020: member

    Can be tested by calling -reindex or -loadblock and then pressing CTRL+C.

    Should print something like:

    0...
    12020-04-27T19:34:31Z [loadblk] Reindexing block file blk00005.dat...
    2^C2020-04-27T19:34:32Z [loadblk] Shutdown requested. Exit ThreadImport
    32020-04-27T19:34:32Z [qt-init] Interrupting HTTP server
    4...
    
  2. init: Remove boost from ThreadImport faec3dc2ad
  3. MarcoFalke added the label Refactoring on Apr 27, 2020
  4. DrahtBot commented at 11:04 pm on April 27, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #18758 (Remove unused boost/thread by MarcoFalke)

    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.

  5. practicalswift commented at 6:19 am on April 28, 2020: contributor
    Concept ACK
  6. MarcoFalke commented at 12:32 pm on April 28, 2020: member
    Open-Close to re-run ci. See #15847 (comment)
  7. MarcoFalke closed this on Apr 28, 2020

  8. MarcoFalke reopened this on Apr 28, 2020

  9. MarcoFalke added this to the "In progress" column in a project

  10. in src/validation.cpp:4757 in faec3dc2ad
    4753@@ -4754,9 +4754,7 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFi
    4754     } catch (const std::runtime_error& e) {
    4755         AbortNode(std::string("System error: ") + e.what());
    4756     }
    4757-    if (nLoaded > 0)
    4758-        LogPrintf("Loaded %i blocks from external file in %dms\n", nLoaded, GetTimeMillis() - nStart);
    4759-    return nLoaded > 0;
    4760+    LogPrintf("Loaded %i blocks from external file in %dms\n", nLoaded, GetTimeMillis() - nStart);
    


    hebasto commented at 0:40 am on May 2, 2020:
    This change adds log entry if nLoaded == 0. Is it intentional?

    MarcoFalke commented at 6:30 pm on May 2, 2020:
    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.
  11. hebasto commented at 0:48 am on May 2, 2020: member
    Concept ACK.
  12. in src/init.cpp:733 in faec3dc2ad
    726@@ -723,6 +727,10 @@ static void ThreadImport(std::vector<fs::path> vImportFiles)
    727         if (file) {
    728             LogPrintf("Importing blocks file %s...\n", path.string());
    729             LoadExternalBlockFile(chainparams, file);
    730+            if (ShutdownRequested()) {
    731+                LogPrintf("Shutdown requested. Exit %s\n", __func__);
    732+                return;
    733+            }
    


    hebasto commented at 1:02 am on May 2, 2020:
    Shouldn’t this block be outside of the if ... else ... statement?

    MarcoFalke commented at 6:37 pm on May 2, 2020:
    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.
  13. hebasto approved
  14. hebasto commented at 10:52 pm on May 2, 2020: member
    ACK faec3dc2adc487af97c22408f9f0bfe33f44a230, tested on Linux Mint 19.3 (x86_64) both bitcoind and bitcoin-qt binaries.
  15. laanwj commented at 1:41 pm on May 4, 2020: member
    Code review ACK faec3dc2adc487af97c22408f9f0bfe33f44a230
  16. laanwj merged this on May 4, 2020
  17. laanwj closed this on May 4, 2020

  18. MarcoFalke deleted the branch on May 4, 2020
  19. sidhujag referenced this in commit 9268ba58db on May 4, 2020
  20. ComputerCraftr referenced this in commit 9758b7f4ad on Jun 16, 2020
  21. Fabcien referenced this in commit 521692129e on Jan 27, 2021
  22. fanquake moved this from the "In progress" to the "Done" column in a project

  23. kittywhiskers referenced this in commit 05248a39b2 on Jul 13, 2021
  24. kittywhiskers referenced this in commit b00ae0d272 on Jul 13, 2021
  25. kittywhiskers referenced this in commit 5838603025 on Jul 13, 2021
  26. kittywhiskers referenced this in commit cdf5504649 on Jul 13, 2021
  27. kittywhiskers referenced this in commit 1e2bbca9c8 on Jul 15, 2021
  28. kittywhiskers referenced this in commit efbc709745 on Jul 15, 2021
  29. kittywhiskers referenced this in commit 88a646f3c0 on Jul 15, 2021
  30. kittywhiskers referenced this in commit 9ae5a4c871 on Jul 16, 2021
  31. UdjinM6 referenced this in commit 730a89f8ed on Jul 16, 2021
  32. vijaydasmp referenced this in commit 8a669535a6 on Aug 23, 2021
  33. DrahtBot locked this on Feb 15, 2022

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-12-18 21:12 UTC

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