Skip to content

bank dedupe and cleanup, guard, log, comments#924

Merged
xmariachi merged 1 commit intoalek/restructure-emissions-keeperfrom
fix/pr919-banking-cleanup
Mar 3, 2026
Merged

bank dedupe and cleanup, guard, log, comments#924
xmariachi merged 1 commit intoalek/restructure-emissions-keeperfrom
fix/pr919-banking-cleanup

Conversation

@xmariachi
Copy link
Contributor

@xmariachi xmariachi commented Mar 3, 2026

Purpose of Changes and their Description

Bank deduping, clarity, guards, log / comments fixed.

Are these changes tested and documented?

  • If tested, please describe how. If not, why tests are not needed. -- unit tests passed. No functionality change.
  • If documented, please describe where. If not, describe why docs are not needed. -- not needed, no functionality change
  • Added to Unreleased section of CHANGELOG.md? -- not needed, no functionality change

Summary by cubic

Unified bank balance lookups under GetBalance and switched all call sites. Added a guard to block negative transfers from rewards to ecosystem, and tightened error text and comments.

  • Refactors

    • Replaced GetBankBalance with GetBalance and removed the duplicate wrapper.
    • Updated invariants, msgserver, and reward distribution to use GetBalance.
    • Clarified score EMA comments to reflect (topic, actor) keys.
  • Bug Fixes

    • Prevent negative amounts in MoveCoinsFromAlloraRewardsToEcosystem.
    • More accurate error message in GetTotalSumPreviousTopicWeights.

Written for commit fc29bdd. Summary will update on new commits.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@xmariachi xmariachi force-pushed the fix/pr919-banking-cleanup branch from 43fee65 to fc29bdd Compare March 3, 2026 18:39
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@xmariachi xmariachi merged commit 5937257 into alek/restructure-emissions-keeper Mar 3, 2026
11 checks passed
@xmariachi xmariachi deleted the fix/pr919-banking-cleanup branch March 3, 2026 19:16
xmariachi added a commit that referenced this pull request Mar 9, 2026
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v           ✰  Thanks for creating a PR! You're awesome! ✰
v Please note that maintainers will only review those PRs with a
completed PR template.
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

## Purpose of Changes and their Description

Bank deduping, clarity, guards, log / comments fixed.

## Are these changes tested and documented?

- [x] If tested, please describe how. If not, why tests are not needed.
-- unit tests passed. No functionality change.
- [ ] If documented, please describe where. If not, describe why docs
are not needed. -- not needed, no functionality change
- [ ] Added to `Unreleased` section of `CHANGELOG.md`? -- not needed, no
functionality change

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Unified bank balance lookups under GetBalance and switched all call
sites. Added a guard to block negative transfers from rewards to
ecosystem, and tightened error text and comments.

- **Refactors**
- Replaced GetBankBalance with GetBalance and removed the duplicate
wrapper.
- Updated invariants, msgserver, and reward distribution to use
GetBalance.
  - Clarified score EMA comments to reflect (topic, actor) keys.

- **Bug Fixes**
  - Prevent negative amounts in MoveCoinsFromAlloraRewardsToEcosystem.
  - More accurate error message in GetTotalSumPreviousTopicWeights.

<sup>Written for commit fc29bdd.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
xmariachi added a commit that referenced this pull request Mar 9, 2026
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v           ✰  Thanks for creating a PR! You're awesome! ✰
v Please note that maintainers will only review those PRs with a
completed PR template.
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

## Purpose of Changes and their Description

Bank deduping, clarity, guards, log / comments fixed.

## Are these changes tested and documented?

- [x] If tested, please describe how. If not, why tests are not needed.
-- unit tests passed. No functionality change.
- [ ] If documented, please describe where. If not, describe why docs
are not needed. -- not needed, no functionality change
- [ ] Added to `Unreleased` section of `CHANGELOG.md`? -- not needed, no
functionality change

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Unified bank balance lookups under GetBalance and switched all call
sites. Added a guard to block negative transfers from rewards to
ecosystem, and tightened error text and comments.

- **Refactors**
- Replaced GetBankBalance with GetBalance and removed the duplicate
wrapper.
- Updated invariants, msgserver, and reward distribution to use
GetBalance.
  - Clarified score EMA comments to reflect (topic, actor) keys.

- **Bug Fixes**
  - Prevent negative amounts in MoveCoinsFromAlloraRewardsToEcosystem.
  - More accurate error message in GetTotalSumPreviousTopicWeights.

<sup>Written for commit fc29bdd.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
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