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. 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
  6. 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.

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

  10. sipa deleted the branch on May 3, 2013
  11. laudney referenced this in commit a009746810 on Mar 19, 2014
  12. HashUnlimited referenced this in commit 5827cbce09 on Jun 4, 2018
  13. DrahtBot 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-04-19 09:16 UTC

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