Allow abort of ConnectBlock() when shutdown requested. #9719

pull rebroad wants to merge 1 commits into bitcoin:master from rebroad:AbortConnectBlockAtShutdown changing 1 files +7 −1
  1. rebroad commented at 6:28 am on February 8, 2017: contributor
    Fixes one of the issues mentioned in #9668 - i.e. speeds up shutdown (can save over 30 seconds in some cases), which can cause shutdown to be aborted on some operating systems (if the OS does not allow as much time as bitcoind was requiring).
  2. Allow abortion of ConnectBlock() when shutdown requested. 8eab85cf67
  3. rebroad renamed this:
    Allow abortion of ConnectBlock() when shutdown requested.
    Allow abort of ConnectBlock() when shutdown requested.
    on Feb 8, 2017
  4. fanquake added the label Validation on Feb 8, 2017
  5. jtimon commented at 0:12 am on September 7, 2017: contributor
    utACK
  6. kallewoof approved
  7. kallewoof commented at 8:40 am on February 22, 2018: member
    utACK
  8. TheBlueMatt commented at 3:37 pm on March 2, 2018: member
    This effectively partially reverts #12367, which may be OK because of the fixes in #12349, but needs a careful look.
  9. in src/validation.cpp:1873 in 8eab85cf67
    1869@@ -1870,6 +1870,10 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
    1870     txdata.reserve(block.vtx.size()); // Required so that pointers to individual PrecomputedTransactionData don't get invalidated
    1871     for (unsigned int i = 0; i < block.vtx.size(); i++)
    1872     {
    1873+        if (ShutdownRequested()) {
    


    rebroad commented at 5:38 pm on March 19, 2018:
    @TheBlueMatt are you saying this might crash if it aborts during the genesis block (and only the genesis block)? If so, I will add an extra check to exclude this exceptional (and unlikely) situation.
  10. DrahtBot closed this on Jul 20, 2018

  11. DrahtBot commented at 6:53 pm on July 20, 2018: member
  12. MarcoFalke reopened this on Jul 20, 2018

  13. DrahtBot commented at 5:03 pm on August 29, 2018: member
  14. DrahtBot added the label Needs rebase on Aug 29, 2018
  15. fanquake added the label Up for grabs on Oct 10, 2018
  16. fanquake commented at 2:53 am on October 10, 2018: member
    Labelling this “Up for Grabs” and closing.
  17. fanquake closed this on Oct 10, 2018

  18. laanwj removed the label Needs rebase on Oct 24, 2019
  19. MarcoFalke locked this on Dec 16, 2021

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: 2025-08-12 18:13 UTC

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