Skip to content

fix sort by weight instead of topic id; rm excess sort logic#766

Merged
kpeluso merged 2 commits intodevfrom
kenny/engn-3518-171-difference-in-sorting-order-across
Mar 12, 2025
Merged

fix sort by weight instead of topic id; rm excess sort logic#766
kpeluso merged 2 commits intodevfrom
kenny/engn-3518-171-difference-in-sorting-order-across

Conversation

@kpeluso
Copy link
Contributor

@kpeluso kpeluso commented Mar 11, 2025

Purpose of Changes and their Description

Difference in sorting order across UpdateNoncesOfActiveTopics and EmitRewards was resolved. Code in former sorted on the wrong condition resulting in unintended functionality, possibly including giving rewards to the wrong topics when the number of active topics exceeds MaxActiveTopicsPerBlock.

Was able to remove some excess logic as well.

Link(s) to Ticket(s) or Issue(s) resolved by this PR

https://linear.app/alloralabs/issue/ENGN-3518/171-difference-in-sorting-order-across-updatenoncesofactivetopics-and

Are these changes tested and documented?

  • If tested, please describe how. If not, why tests are not needed.
    • Unit tests
  • If documented, please describe where. If not, describe why docs are not needed.
    • Executes intended functionality as explained in code comments
  • Added to Unreleased section of CHANGELOG.md?

Still Left Todo

Fill this out if this is a Draft PR so others can help.

Copy link
Contributor

@amimart amimart left a comment

Choose a reason for hiding this comment

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

LGTM

@kpeluso kpeluso merged commit e08e00c into dev Mar 12, 2025
9 checks passed
@kpeluso kpeluso deleted the kenny/engn-3518-171-difference-in-sorting-order-across branch March 12, 2025 20:14
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.

3 participants