Skip to content

fix: resolve duplicate charge_fee_to_insurance from squash merge - #83

Merged
dcccrypto merged 1 commit into
masterfrom
hotfix/dedup-charge-fee
Apr 6, 2026
Merged

fix: resolve duplicate charge_fee_to_insurance from squash merge#83
dcccrypto merged 1 commit into
masterfrom
hotfix/dedup-charge-fee

Conversation

@dcccrypto

Copy link
Copy Markdown
Owner

Summary

  • The squash of PR merge: sync upstream aeyakovenko/percolator v12.1 (136 commits) #82 landed two impl RiskEngine methods with the same name charge_fee_to_insurance but different signatures, causing a compile error
  • Renames the old 1-arg sweep-debt variant to sweep_fee_debt_to_insurance (what it actually does)
  • Updates both call sites in settle_maintenance_fee and settle_maintenance_fee_best_effort_for_crank
  • All 54 lib tests pass

Test plan

  • cargo test --lib passes
  • cargo build-sbf --features mainnet in percolator-prog compiles cleanly

🤖 Generated with Claude Code

…bt_to_insurance

The squash of PR #82 landed two definitions with the same name:
- 2-arg: charge_fee_to_insurance(idx, fee) -> Result<(u128,u128)>  [new, from fix/PERC-8463]
- 1-arg: charge_fee_to_insurance(idx) -> u128  [old sweep-debt helper]

Rename the 1-arg variant to sweep_fee_debt_to_insurance (matching its
actual role: sweeping existing negative fee_credits into insurance).
Update its two call sites in settle_maintenance_fee and
settle_maintenance_fee_best_effort_for_crank.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dcccrypto
dcccrypto merged commit 1e7a165 into master Apr 6, 2026
1 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Apr 6, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@dcccrypto has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 39 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 39 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7a89f0ed-a3e1-498b-8d46-9dc6a54c5df8

📥 Commits

Reviewing files that changed from the base of the PR and between 9a1c627 and aa109eb.

📒 Files selected for processing (1)
  • src/percolator.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/dedup-charge-fee

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant