Remove unused constants #10560

pull practicalswift wants to merge 2 commits into bitcoin:master from practicalswift:noop-modes changing 2 files +1 −4
  1. practicalswift commented at 11:21 PM on June 8, 2017: contributor
    • Remove unused constant MEMPOOL_GD_VERSION
    • Comment out unused constant REJECT_DUST
  2. fanquake added the label Refactoring on Jun 8, 2017
  3. achow101 commented at 11:31 PM on June 8, 2017: member

    NACK -testsafemode is not unused. It is part of GetWarnings and will set a warning for strStatusBar, strRPC, and strGUI which will then trigger the safe mode handling of RPCs. Safe mode is still used in the RPCs to disable certain RPCs if safe mode is enabled.

  4. practicalswift commented at 11:44 PM on June 8, 2017: contributor

    @achow101 Ah, sorry. I missed that the safe mode logic in OnRPCPreCommand is triggered by strRPC != nullptr (via GetWarnings("rpc") :-) Thanks for clarifying. Reverting that part of this PR.

  5. Remove unused constant MEMPOOL_GD_VERSION 3289ef4fe1
  6. practicalswift force-pushed on Jun 8, 2017
  7. practicalswift renamed this:
    Remove non-existing "force safe mode" (-testsafemode). Remove unused constants.
    Remove unused constants
    on Jun 8, 2017
  8. practicalswift commented at 11:46 PM on June 8, 2017: contributor

    @achow101 Updated :-)

  9. in src/consensus/validation.h:17 in dca533c6c7 outdated
      13 | @@ -14,7 +14,7 @@ static const unsigned char REJECT_INVALID = 0x10;
      14 |  static const unsigned char REJECT_OBSOLETE = 0x11;
      15 |  static const unsigned char REJECT_DUPLICATE = 0x12;
      16 |  static const unsigned char REJECT_NONSTANDARD = 0x40;
      17 | -static const unsigned char REJECT_DUST = 0x41;
      18 | +// static const unsigned char REJECT_DUST = 0x41;
    


    achow101 commented at 12:46 AM on June 9, 2017:

    Since this is part of BIP 61, I think it should remain as is even though it is unused.


    practicalswift commented at 5:25 AM on June 9, 2017:

    @achow101 I intentionally left it commented out instead of removing it. By commenting it out we get rid of unused constant warnings until it is used :-)

  10. Comment out unused constant REJECT_DUST dce82397c1
  11. practicalswift force-pushed on Jun 9, 2017
  12. practicalswift commented at 1:22 PM on June 9, 2017: contributor

    @achow101 Thanks for reviewing! Added a comment about BIP 61. Looks good?

  13. sipa commented at 8:13 PM on June 9, 2017: member

    utACK dce82397c1540769a8b39a9a475c366cb9438469

  14. achow101 commented at 9:03 PM on June 9, 2017: member

    utACK dce82397c1540769a8b39a9a475c366cb9438469

  15. fanquake commented at 6:53 AM on June 10, 2017: member

    utACK dce8239

  16. laanwj merged this on Jun 11, 2017
  17. laanwj closed this on Jun 11, 2017

  18. laanwj referenced this in commit 562caf1c74 on Jun 11, 2017
  19. PastaPastaPasta referenced this in commit 579cdd5472 on Jul 5, 2019
  20. PastaPastaPasta referenced this in commit 683b30c8e1 on Jul 5, 2019
  21. PastaPastaPasta referenced this in commit 52bc13007d on Jul 6, 2019
  22. PastaPastaPasta referenced this in commit c47668ce78 on Jul 8, 2019
  23. PastaPastaPasta referenced this in commit 6a0f565783 on Jul 8, 2019
  24. barrystyle referenced this in commit 56508af2e3 on Jan 22, 2020
  25. practicalswift deleted the branch on Apr 10, 2021
  26. DrahtBot locked this on Aug 18, 2022

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