fix: snapshot markets Map in ADL scanAll (H6)#88
fix: snapshot markets Map in ADL scanAll (H6)#880x-SquidSol wants to merge 1 commit intodcccrypto:mainfrom
Conversation
…on (H6) ADL scanAll() iterated the live CrankService markets Map reference. CrankService.discover() can add/delete markets via async interleaving during the ADL scan loop, causing undefined iterator behavior. Snapshot with new Map() before iterating, matching the pattern already used by LiquidationService at liquidation.ts:611. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
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 4 minutes and 3 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
scanAll()iterated the liveCrankService.marketsMap referenceCrankService.discover()can add/delete markets via async interleaving during the ADL scan loopLiquidationServicealready correctly snapshots withnew Map(getMarkets())at line 611Fix
One-line change:
new Map(this._getMarkets())instead ofthis._getMarkets().Test plan
🤖 Generated with Claude Code