-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes to the list insert functions #46
Fixes to the list insert functions #46
Conversation
WalkthroughThe changes introduce modifications to the Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments not posted (8)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Fixes two issues in the
RepoTokenList.insertSorted
andTermAuctionList.insertPending
functions:next
pointer was not being set toNULL_NODE
. This means that if for any reason the storage slot of thenext
pointer is not initialized to 0, the list would be left in an inconsistent state. It is safer to assign the pointer toNULL_NODE
at the time of insertion.t1
andt2
in the list with the same maturity, witht1
coming first, it was possible to introduce a cycle by insertingt2
again. The insertion function would stop as soon as it found the first token with the same maturity, insertingt2
beforet1
without checking to see if it already appeared later on the list. This is fixed by changing the maturity comparison check from<=
to<
. The same is the case for comparing between auctions in theTermAuctionList
.Summary by CodeRabbit
New Features
Bug Fixes