Make SetBestChain() atomic #2058

pull sipa wants to merge 1 commits into bitcoin:master from sipa:atomicreorg changing 1 files +11 −11
  1. sipa commented at 4:41 PM on December 1, 2012: member

    In case a reorganisation fails, the internal state could become inconsistent (memory only). Previously, a cache per block connect or disconnect action was used, so blocks could not be applied in a partial way. Extend this to a cache for the entire reorganisation, making it atomic entirely. This also simplifies the code a bit.

    I haven't seen any reports of problems because of this, but it should be fixed.

  2. BitcoinPullTester commented at 4:59 PM on December 1, 2012: none

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

  3. BitcoinPullTester commented at 5:27 PM on December 1, 2012: none

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

  4. gavinandresen commented at 7:00 PM on December 1, 2012: contributor

    ACK

  5. sipa cross-referenced this on Dec 1, 2012 from issue Add -benchmark for reporting block processing times by sipa
  6. Make SetBestChain() atomic
    In case a reorganisation fails, the internal state could become
    inconsistent (memory only). Previously, a cache per block connect
    or disconnect action was used, so blocks could not be applied in
    a partial way. Extend this to a cache for the entire reorganisation,
    making it atomic entirely. This also simplifies the code a bit.
    d33a9218ab
  7. sipa cross-referenced this on Dec 2, 2012 from issue Parallel script verification by sipa
  8. BitcoinPullTester commented at 1:35 AM on December 2, 2012: none

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

  9. sipa referenced this in commit 469e606141 on Dec 3, 2012
  10. sipa merged this on Dec 3, 2012
  11. sipa closed this on Dec 3, 2012

  12. sipa deleted the branch on May 3, 2013
  13. laudney referenced this in commit a009746810 on Mar 19, 2014
  14. HashUnlimited referenced this in commit 5827cbce09 on Jun 4, 2018
  15. bitcoin locked this on Sep 8, 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-05-20 06:55 UTC