Closed jayy04 closed 6 days ago
The changes involve refactoring the creation of perpetual and asset positions in the protocol/testutil/constants
package. Instead of using dtypes.NewInt
, the code now employs big.NewInt
within newly introduced testutil
functions. This enhances numerical precision and the ability to handle large numbers.
Files | Summary |
---|---|
protocol/testutil/constants/positions.go |
Refactored the initialization of perpetual and asset positions to use big.NewInt via testutil functions. |
protocol/testutil/constants/subaccounts.go |
Replaced direct initialization of PerpetualPositions with testutil.CreateSinglePerpetualPosition using big.Int . |
No complex control flow changes warranting a sequence diagram were introduced.
A rabbit hopped with boundless cheer,
Numbers now so very clear,
big.NewInt
to hold the might,
Precision soaring to new height.
Positions strong, they hold their ground,
In digits deep, they're safe and sound.
The code now runs without a hitch,
With every byte, a perfect pitch! 🎵
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?
Changelist
[Describe or list the changes made in this PR]
Test Plan
[Describe how this PR was tested (if applicable)]
Author/Reviewer Checklist
state-breaking
label.indexer-postgres-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.Summary by CodeRabbit