Skip to content

Conversation

@yihuang
Copy link

@yihuang yihuang commented Mar 25, 2024

Description

do saturated conversion instead.


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@yihuang yihuang requested a review from mmsqe March 25, 2024 05:54
@yihuang yihuang mentioned this pull request Mar 25, 2024
11 tasks
@codecov
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 73.68421% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 62.56%. Comparing base (00b9e0e) to head (566f06b).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #433      +/-   ##
===========================================
+ Coverage    62.53%   62.56%   +0.02%     
===========================================
  Files          130      130              
  Lines        12495    12512      +17     
===========================================
+ Hits          7814     7828      +14     
- Misses        4135     4138       +3     
  Partials       546      546              
Files Coverage Δ
x/feemarket/keeper/params.go 48.57% <100.00%> (ø)
types/int.go 55.88% <72.22%> (+26.47%) ⬆️

@yihuang yihuang enabled auto-merge (squash) March 25, 2024 06:54
use sdkmath.MaxBitLen

cleanup

changelog

Co-authored-by: Brian Luk <brian6.dev@gmail.com>
@yihuang yihuang force-pushed the fix/prevent-int-overflow branch from ec783d0 to 566f06b Compare March 25, 2024 06:55
@yihuang yihuang merged commit a97cd08 into crypto-org-chain:develop Mar 25, 2024
@yihuang yihuang deleted the fix/prevent-int-overflow branch March 25, 2024 07:33
mmsqe added a commit that referenced this pull request Mar 26, 2024
…435)

* Problem: base fee conversion could panic on overflow (#433)

* prevent integer overflow

use sdkmath.MaxBitLen

cleanup

* changelog

---------

Co-authored-by: Brian Luk <brian6.dev@gmail.com>

* Update CHANGELOG.md

Signed-off-by: yihuang <huang@crypto.com>

---------

Signed-off-by: yihuang <huang@crypto.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Brian Luk <brian6.dev@gmail.com>
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.

2 participants