Skip to content

fix: use checked creation fee arithmetic#541

Closed
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/checked-creation-fee-490
Closed

fix: use checked creation fee arithmetic#541
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/checked-creation-fee-490

Conversation

@dangelo352

Copy link
Copy Markdown

Summary

  • route commitment_core creation-fee calculation through the checked bps helper
  • keep guard reset behavior on arithmetic overflow before failing as ArithmeticOverflow
  • document the checked creation-fee source of truth

Tests

  • CARGO_TARGET_DIR=/tmp/commitlabs-fee490-target cargo test -p commitment_core create_commitment_fee -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-fee490-target cargo test -p commitment_core test_create_commitment_fee_overflow_resets_reentrancy_guard -- --nocapture
  • git diff --check

Closes #490

@dangelo352

Copy link
Copy Markdown
Author

Closing as superseded by #519, which already implements the checked creation-fee path for #490 and is green with overflow/guard-reset coverage. I opened this duplicate while continuing the bounty queue; keeping #519 as the canonical PR.

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.

Remove duplicated creation-fee computation in commitment_core::create_commitment

1 participant