COIN_VALUE no longer accessible in const contexts #31113

issue casey opened this issue on October 18, 2024
  1. casey commented at 7:33 PM on October 18, 2024: contributor

    The COIN_VALUE const was removed, I assume in favor of Amount::ONE_BTC, however, if you need a u64 in a const context, I don't think you can get it because Amount::to_sat is not marked const. I think this could be allowed by making Amount::to_sat const.

  2. theStack commented at 11:18 PM on October 18, 2024: contributor

    Was this issue intended for another project? Bitcoin Core never had a COIN_VALUE constant, there is also no Amount class (or namespace).

  3. casey commented at 11:26 PM on October 18, 2024: contributor

    Oh no. Yes, it was, this was intended for rust-bitcoin/rust-bitcoin 😅 Sorry for the noise!

  4. casey closed this on Oct 18, 2024

  5. bitcoin locked this on Oct 23, 2024
Contributors

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-02 15:13 UTC

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