consensus: move amount.h into consensus #22951

pull fanquake wants to merge 3 commits into bitcoin:master from fanquake:move_amount_h_consensus changing 71 files +74 −54
  1. fanquake commented at 8:39 am on September 11, 2021: member

    A first step (of a few) towards some source code reorganization, as well as making libbitcoinconsensus slightly more self contained.

    Related to #15732.

  2. fanquake added the label Consensus on Sep 11, 2021
  3. DrahtBot commented at 2:54 pm on September 11, 2021: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #23155 (rpc: various fixups for dumptxoutset by jamesob)
    • #23137 (Move-only: bloom to src/common by MarcoFalke)
    • #23004 (multiprocess: Run external signer in wallet not node process by ryanofsky)
    • #22918 (rpc: Add level 3 verbosity to getblock RPC call (#21245 modified) by kiminuo)
    • #15606 (assumeutxo by jamesob)
    • #15294 ([moveonly] wallet: Extract RipeMd160 by Empact)

    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.

  4. laanwj commented at 8:00 am on September 14, 2021: member

    Concept ACK. I think this is organizationally the right thing to do. Nearly everything in amount.h is consensus critical:

    • type CAmount
    • constant MAX_MONEY
    • function MoneyRange

    Even COIN, though it strictly is a presentation detail, is used in src/validation.cpp to set the initial subsidy. So changing it would be consensus critical.

  5. DrahtBot added the label Needs rebase on Sep 16, 2021
  6. fanquake force-pushed on Sep 17, 2021
  7. DrahtBot removed the label Needs rebase on Sep 17, 2021
  8. fanquake force-pushed on Sep 22, 2021
  9. hebasto commented at 3:11 pm on September 25, 2021: member
    Concept ACK.
  10. hebasto approved
  11. hebasto commented at 4:40 pm on September 25, 2021: member

    ACK 2c1554a10940e471708d0d81bde0d490dc1c73b4.

    I see the last two commits as a way to modernize amount.h. Here are some additional suggestions:

    • use type alias instead of typedef
    • use separators for integer literals
    • s/nValue/value/ to follow our name convention
    • pass CAmount as a non-reference parameter: s/const CAmount&/CAmount/. Also #23076 (comment).
  12. DrahtBot added the label Needs rebase on Sep 28, 2021
  13. practicalswift commented at 3:21 pm on September 29, 2021: contributor
    Concept ACK
  14. [MOVEONLY] consensus: move amount.h into consensus
    Move amount.h to consensus/amount.h.
    Renames, adds missing and removes uneeded includes.
    d09071da5b
  15. consensus: make COIN & MAX_MONEY constexpr 863e52fe63
  16. consensus: use <cstdint> over <stdint.h> in amount.h 9d0379cea6
  17. fanquake force-pushed on Sep 29, 2021
  18. DrahtBot removed the label Needs rebase on Sep 30, 2021
  19. MarcoFalke commented at 7:41 am on October 5, 2021: member

    concept ACK 9d0379cea6c164610d05287ae6dd4e66f35b92b 🏝

    Signature:

     0-----BEGIN PGP SIGNED MESSAGE-----
     1Hash: SHA512
     2
     3concept ACK 9d0379cea6c164610d05287ae6dd4e66f35b92b 🏝
     4-----BEGIN PGP SIGNATURE-----
     5
     6iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
     7pUiIegv/UQSjhE3MlZkZ8Q9eV6M5sxc+xLMthzRmDDxQrktiXjsquDzCTLaKGrlA
     826ASYaHNdvfTPn3UMY8IU2ibgI5EwRYgzOR4jWqlr7gBTU4DqQobi/oxxYrZPFTf
     925Js5ET2yeIhCfusFwqorUXOI7zH/ehA7Om8re6zvWMyc3zMfDOCcI4+BCNF4Dbq
    10aOWlS1j8GZaK7RtgUDCkk9z0gwZNTKfgJSDmWc7Lh1dsvawcOFAkF2nAZtwSfyxN
    11//XU90+V0JMJz8sDkqBskidKi2tPi9j09ijqlo7ISBcA72skMzbBxLByo8nkZqv1
    122D1OY/tqP6qDjhSwIb9OVf3/sWqRsMn5mz16yQ/KvhslyG8RY8ye8mYpFV6Xb7N3
    13mWIiDgI15LcjsoNi1MBB2979OI3oNahxaVV9SjxUq8M8zsBGe2IT8mq4KdUunccf
    140pCfiebUvJNg+/4pq+d6a3BA+tdzYP5MDNQ6xminkn0wVytxskD3mkD/Jck83nOu
    15VVQPRV9w
    16=KxXo
    17-----END PGP SIGNATURE-----
    

    Timestamp of file with hash fc451b85b7714b6efec31b9a07f211a521da7a434e0bfda8e649fdc21e55b2f6 -

  20. MarcoFalke added the label Refactoring on Oct 5, 2021
  21. MarcoFalke merged this on Oct 5, 2021
  22. MarcoFalke closed this on Oct 5, 2021

  23. fanquake deleted the branch on Oct 5, 2021
  24. sidhujag referenced this in commit 290a7fbbdd on Oct 5, 2021
  25. Fabcien referenced this in commit 25b4445fda on Oct 10, 2022
  26. DrahtBot locked this on Oct 30, 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: 2024-09-28 22:12 UTC

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