-
Notifications
You must be signed in to change notification settings - Fork 240
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
Problem: memiavl can't be used with different cosmos-sdk versions #1154
Conversation
Closes: #1152 Solution: - remove memiavl's dependency on cosmos-sdk, only the store package depends on sdk version
f86f32b
to
4ada8a2
Compare
Signed-off-by: yihuang <huang@crypto.com>
return &MultiTreeImporter{ | ||
dir: dir, | ||
height: int64(height), | ||
snapshotDir: snapshotName(int64(height)), |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
} | ||
return &MultiTreeImporter{ | ||
dir: dir, | ||
height: int64(height), |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
} | ||
mtree, err = LoadMultiTree(filepath.Join(db.dir, snapshotName(int64(version))), true, 0) | ||
mtree, err = LoadMultiTree(filepath.Join(dir, snapshotName(int64(version))), true, 0) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
if height > math.MaxUint32 { | ||
return fmt.Errorf("height overflows uint32: %d", height) | ||
} | ||
version := uint32(height) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
node := &memiavl.ExportNode{ | ||
Key: item.IAVL.Key, | ||
Value: item.IAVL.Value, | ||
Height: int8(item.IAVL.Height), |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1154 +/- ##
==========================================
- Coverage 46.62% 46.60% -0.02%
==========================================
Files 104 105 +1
Lines 7900 7884 -16
==========================================
- Hits 3683 3674 -9
Misses 3843 3843
+ Partials 374 367 -7
|
Co-authored-by: mmsqe <mavis@crypto.com> Signed-off-by: yihuang <huang@crypto.com>
Closes: #1152
Solution:
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)