amount: Move CAmount CENT to unit test header #14244

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1809-amountNoCENT changing 5 files +12 −11
  1. MarcoFalke commented at 6:46 pm on September 17, 2018: member
    CAmount is currently not type-safe. Exporting a constant (CENT) that is commonly not referred to by that name might be confusing. CENT is only used in two places prior to this commit (ParseMoney and MIN_CHANGE). So replace these with constants relative to COIN and move CENT to the unit test header.
  2. amount: Move CAmount CENT to unit test header fa84723e73
  3. MarcoFalke added the label Refactoring on Sep 17, 2018
  4. DrahtBot commented at 10:29 pm on September 17, 2018: member
    • #14156 ([WIP] refactor: Make explicit CMutableTransaction -> CTransaction conversion. by lucash-dev)
    • #13470 (WIP [bench] CCoinsView(Cache): measure various scenarios by Sjors)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. laanwj commented at 7:35 pm on September 18, 2018: member
    Concept ACK, getting rid of CENT is something I’ve been want to do for a while, no one uses the word ‘cent’ for bitcoins
  6. Empact commented at 4:09 am on September 19, 2018: member
    utACK fa84723
  7. in src/test/test_bitcoin.h:40 in fa84723e73
    36@@ -37,6 +37,8 @@ static inline uint64_t InsecureRandBits(int bits) { return insecure_rand_ctx.ran
    37 static inline uint64_t InsecureRandRange(uint64_t range) { return insecure_rand_ctx.randrange(range); }
    38 static inline bool InsecureRandBool() { return insecure_rand_ctx.randbool(); }
    39 
    40+static constexpr CAmount CENT{1000000};
    


    promag commented at 9:23 pm on September 26, 2018:
    nit, could be CENT{COIN / 100}?
  8. promag commented at 9:23 pm on September 26, 2018: member
    utACK fa84723.
  9. ryanofsky commented at 3:37 pm on September 27, 2018: member
    utACK fa84723e73d3d7766e7821881ac96ec203e50efc
  10. MarcoFalke merged this on Sep 27, 2018
  11. MarcoFalke closed this on Sep 27, 2018

  12. MarcoFalke deleted the branch on Sep 27, 2018
  13. deadalnix referenced this in commit 58be0d7ee9 on Mar 17, 2020
  14. ftrader referenced this in commit fde461960e on May 19, 2020
  15. kittywhiskers referenced this in commit f82a829a6c on Jun 4, 2021
  16. kittywhiskers referenced this in commit 6a2a137e71 on Jun 5, 2021
  17. kittywhiskers referenced this in commit 11ac41b265 on Jun 16, 2021
  18. kittywhiskers referenced this in commit 0a1fbc8320 on Jun 24, 2021
  19. kittywhiskers referenced this in commit f02b4a283d on Jun 25, 2021
  20. kittywhiskers referenced this in commit 884808cedf on Jun 25, 2021
  21. kittywhiskers referenced this in commit b53b395886 on Jun 26, 2021
  22. kittywhiskers referenced this in commit 60bcca3737 on Jun 27, 2021
  23. PastaPastaPasta referenced this in commit 75033d21f6 on Jun 27, 2021
  24. PastaPastaPasta referenced this in commit d1a6c29a6e on Jun 28, 2021
  25. kittywhiskers referenced this in commit 7cd58cc063 on Jun 28, 2021
  26. PastaPastaPasta referenced this in commit e2f838f757 on Jun 29, 2021
  27. PastaPastaPasta referenced this in commit e24fff7967 on Jul 1, 2021
  28. kittywhiskers referenced this in commit 49fbe647f7 on Jul 2, 2021
  29. 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: 2024-12-22 03:12 UTC

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