Simplify DisconnectBlock arguments/return value #10297

pull sipa wants to merge 1 commits into bitcoin:master from sipa:disconnect_enum changing 1 files +33 −26
  1. sipa commented at 11:16 PM on April 28, 2017: member

    DisconnectBlock currently has a complicated interface which returns a different result based on whether pfClean was passed or not. Change this to return a tristate enum instead. As an added bonus, remove the ValidationState& argument which was unused.

  2. Simplify DisconnectBlock arguments/return value
    DisconnectBlock currently has a complicated interface:
    
      Situation       Return value
                      pfClean != nullptr   pfClean == nullptr
    
      All good:       true                 true
      Failure:        false                false
      Unclean rewind: true                 false
                      with *pfClean=false
    
    Change this to return a tristate enum instead. As an added bonus,
    remove the ValidationState& argument which was unused.
    db994b2de9
  3. fanquake added the label Validation on Apr 28, 2017
  4. dcousens approved
  5. kallewoof commented at 7:31 AM on May 1, 2017: member

    utACK db994b2de93f52c9e7bed8529ca925de5064a46f

  6. TheBlueMatt commented at 5:11 PM on May 1, 2017: member

    utACK db994b2de93f52c9e7bed8529ca925de5064a46f

  7. sdaftuar approved
  8. sdaftuar commented at 5:24 PM on May 1, 2017: member

    utACK db994b2de93f52c9e7bed8529ca925de5064a46f, this is much better

    Would be nice to add a unit test for these return values at some point

  9. sipa merged this on May 3, 2017
  10. sipa closed this on May 3, 2017

  11. sipa referenced this in commit 431a548faa on May 3, 2017
  12. sipa deleted the branch on Jun 23, 2017
  13. codablock referenced this in commit fd4af51ee3 on Sep 27, 2017
  14. codablock referenced this in commit 1a138d66ab on Oct 12, 2017
  15. codablock referenced this in commit 9a266e68d0 on Oct 24, 2017
  16. UdjinM6 referenced this in commit e25e4c928c on Nov 8, 2017
  17. ryan-shaw referenced this in commit f261200b4d on Feb 21, 2018
  18. ryan-shaw referenced this in commit fecb499989 on Feb 21, 2018
  19. PastaPastaPasta referenced this in commit 432012cee2 on Jun 10, 2019
  20. MarcoFalke 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:15 UTC

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