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 12: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

    <!--5d09a71f8925f3f132321140b44b946d-->The last travis run for this pull request was 527 days ago and is thus outdated. To trigger a fresh travis build, this pull request should be closed and re-opened.

  12. MarcoFalke reopened this on Jul 20, 2018

  13. DrahtBot commented at 5:03 PM on August 29, 2018: member

    <!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase

  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: 2026-04-13 21:15 UTC

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