Unused variables in RIPEMD160 namespace #29550

issue Loopite opened this issue on March 4, 2024
  1. Loopite commented at 2:52 PM on March 4, 2024: none

    Please describe the feature you'd like to see added.

    Remove the variables "b" and "d" in the Round function:

    void inline Round(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t f, uint32_t x, uint32_t k, int r)
    {
        a = rol(a + f + x + k, r) + e;
        c = rol(c, 10);
    }
    

    Is your feature related to a problem, if so please describe it.

    No response

    Describe the solution you'd like

    No response

    Describe any alternatives you've considered

    No response

    Please leave any additional context

    No response

  2. Loopite added the label Feature on Mar 4, 2024
  3. araujo88 commented at 3:35 PM on March 4, 2024: contributor

    I believe these unused variables are there for standardization purposes, since there are multiple definitions of this inline function across the crypto module.

  4. fanquake removed the label Feature on Mar 5, 2024
  5. fanquake commented at 10:07 AM on March 5, 2024: member

    Thanks. However we are unlikely to make the refactor you are suggesting. In future, I'd also suggest that opening a PR is a better way to demo a suggested code change, as opposed to an issue. In this case it'd become clear that the change is more involved than just dropping b & d from the function signature.

  6. fanquake closed this on Mar 5, 2024

  7. bitcoin locked this on Mar 5, 2025

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-21 21:13 UTC

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