Skip to content

Comments

fix(context): remove unreachable zero-denominator check in fake_exponential#3039

Merged
rakita merged 1 commit intobluealloy:mainfrom
VolodymyrBg:fix/fake_exponential-dead-zero-check
Oct 2, 2025
Merged

fix(context): remove unreachable zero-denominator check in fake_exponential#3039
rakita merged 1 commit intobluealloy:mainfrom
VolodymyrBg:fix/fake_exponential-dead-zero-check

Conversation

@VolodymyrBg
Copy link
Contributor

  • Remove the redundant if denominator == 0 { return 0; } in fake_exponential.
  • The function already asserts denominator != 0, so the branch is never executed.
  • The denominator originates from protocol constants (BLOB_BASE_FEE_UPDATE_FRACTION_*) and config fallback, both guaranteed non-zero.
  • Keeping the check was contradictory (assert panics vs returning 0) and introduced dead code

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 2, 2025

CodSpeed Performance Report

Merging #3039 will not alter performance

Comparing VolodymyrBg:fix/fake_exponential-dead-zero-check (e05801c) with main (a32f8f4)

Summary

✅ 173 untouched

@rakita rakita merged commit fe23103 into bluealloy:main Oct 2, 2025
31 checks passed
@github-actions github-actions bot mentioned this pull request Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants