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: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    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. DrahtBot cross-referenced this on Sep 11, 2021 from issue Remove txindex migration code by MarcoFalke
  5. DrahtBot cross-referenced this on Sep 11, 2021 from issue wallet, refactor: return out-params of CreateTransaction() as optional struct by theStack
  6. DrahtBot cross-referenced this on Sep 11, 2021 from issue multiprocess: Add bitcoin-gui -ipcconnect option by ryanofsky
  7. DrahtBot cross-referenced this on Sep 11, 2021 from issue multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofsky
  8. DrahtBot cross-referenced this on Sep 12, 2021 from issue interfaces: Expose settings.json methods to GUI by ryanofsky
  9. DrahtBot cross-referenced this on Sep 12, 2021 from issue refactor: Extract RipeMd160 by Empact
  10. DrahtBot cross-referenced this on Sep 13, 2021 from issue Remove unused SERIALIZE_METHODS on CFeeRate by MarcoFalke
  11. 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.

  12. DrahtBot cross-referenced this on Sep 15, 2021 from issue Remove -deprecatedrpc=addresses flag and corresponding code/logic by mjdietzx
  13. DrahtBot added the label Needs rebase on Sep 16, 2021
  14. fanquake force-pushed on Sep 17, 2021
  15. DrahtBot removed the label Needs rebase on Sep 17, 2021
  16. DrahtBot cross-referenced this on Sep 18, 2021 from issue multiprocess: add interfaces::ExternalSigner class by ryanofsky
  17. DrahtBot cross-referenced this on Sep 19, 2021 from issue Multiprocess bitcoin by ryanofsky
  18. DrahtBot cross-referenced this on Sep 21, 2021 from issue refactor: Remove unused validation includes by MarcoFalke
  19. fanquake force-pushed on Sep 22, 2021
  20. hebasto commented at 3:11 PM on September 25, 2021: member

    Concept ACK.

  21. hebasto approved
  22. 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).
  23. DrahtBot added the label Needs rebase on Sep 28, 2021
  24. practicalswift commented at 3:21 PM on September 29, 2021: contributor

    Concept ACK

  25. MarcoFalke cross-referenced this on Sep 29, 2021 from issue Move-only: bloom to src/common by MarcoFalke
  26. [MOVEONLY] consensus: move amount.h into consensus
    Move amount.h to consensus/amount.h.
    Renames, adds missing and removes uneeded includes.
    d09071da5b
  27. consensus: make COIN & MAX_MONEY constexpr 863e52fe63
  28. consensus: use <cstdint> over <stdint.h> in amount.h 9d0379cea6
  29. fanquake force-pushed on Sep 29, 2021
  30. DrahtBot removed the label Needs rebase on Sep 30, 2021
  31. DrahtBot cross-referenced this on Sep 30, 2021 from issue rpc: Add level 3 verbosity to getblock RPC call (#21245 modified) by kiminuo
  32. DrahtBot cross-referenced this on Oct 1, 2021 from issue rpc: various fixups for dumptxoutset by jamesob
  33. DrahtBot cross-referenced this on Oct 2, 2021 from issue assumeutxo by jamesob
  34. MarcoFalke commented at 7:41 AM on October 5, 2021: member

    concept ACK 9d0379cea6c164610d05287ae6dd4e66f35b92b 🏝

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    concept ACK 9d0379cea6c164610d05287ae6dd4e66f35b92b 🏝
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUiIegv/UQSjhE3MlZkZ8Q9eV6M5sxc+xLMthzRmDDxQrktiXjsquDzCTLaKGrlA
    26ASYaHNdvfTPn3UMY8IU2ibgI5EwRYgzOR4jWqlr7gBTU4DqQobi/oxxYrZPFTf
    25Js5ET2yeIhCfusFwqorUXOI7zH/ehA7Om8re6zvWMyc3zMfDOCcI4+BCNF4Dbq
    aOWlS1j8GZaK7RtgUDCkk9z0gwZNTKfgJSDmWc7Lh1dsvawcOFAkF2nAZtwSfyxN
    //XU90+V0JMJz8sDkqBskidKi2tPi9j09ijqlo7ISBcA72skMzbBxLByo8nkZqv1
    2D1OY/tqP6qDjhSwIb9OVf3/sWqRsMn5mz16yQ/KvhslyG8RY8ye8mYpFV6Xb7N3
    mWIiDgI15LcjsoNi1MBB2979OI3oNahxaVV9SjxUq8M8zsBGe2IT8mq4KdUunccf
    0pCfiebUvJNg+/4pq+d6a3BA+tdzYP5MDNQ6xminkn0wVytxskD3mkD/Jck83nOu
    VVQPRV9w
    =KxXo
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash fc451b85b7714b6efec31b9a07f211a521da7a434e0bfda8e649fdc21e55b2f6 -

    </details>

  35. MarcoFalke added the label Refactoring on Oct 5, 2021
  36. MarcoFalke merged this on Oct 5, 2021
  37. MarcoFalke closed this on Oct 5, 2021

  38. fanquake deleted the branch on Oct 5, 2021
  39. sidhujag referenced this in commit 290a7fbbdd on Oct 5, 2021
  40. ryanofsky cross-referenced this on Oct 5, 2021 from issue Add fee_est tool for debugging fee estimation code by ryanofsky
  41. Fabcien referenced this in commit 25b4445fda on Oct 10, 2022
  42. bitcoin 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: 2026-05-20 06:53 UTC