Skip to content
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

upgrade to iavl 1.2.0 #13

Merged

Conversation

0g-wh
Copy link
Collaborator

@0g-wh 0g-wh commented Sep 26, 2024

This change is Reviewable

@0g-wh 0g-wh requested a review from Solovyov1796 September 26, 2024 06:37
sort.Slice(m.pruneSnapshotHeights, func(i, j int) bool { return m.pruneSnapshotHeights[i] < m.pruneSnapshotHeights[j] })
k := 1
for ; k < len(m.pruneSnapshotHeights); k++ {
if m.pruneSnapshotHeights[k] != m.pruneSnapshotHeights[k-1]+int64(m.snapshotInterval) {

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> uint8 Error

integer overflow conversion uint64 -> int64
m.pruneHeightsMx.Lock()
defer m.pruneHeightsMx.Unlock()
m.pruneHeights = loadedPruneHeights
if height%int64(m.opts.Interval) != 0 || height <= int64(m.opts.KeepRecent) {

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> uint8 Error

integer overflow conversion uint64 -> int64
m.pruneHeightsMx.Lock()
defer m.pruneHeightsMx.Unlock()
m.pruneHeights = loadedPruneHeights
if height%int64(m.opts.Interval) != 0 || height <= int64(m.opts.KeepRecent) {

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> uint8 Error

integer overflow conversion uint64 -> int64
if err != nil {
return err
// Consider the snapshot height
pruneHeight := height - 1 - int64(m.opts.KeepRecent) // we should keep the current height at least

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> uint8 Error

integer overflow conversion uint64 -> int64
return nil
// the snapshot `m.pruneSnapshotHeights[0]` is already operated,
// so we can prune upto `m.pruneSnapshotHeights[0] + int64(m.snapshotInterval) - 1`
snHeight := m.pruneSnapshotHeights[0] + int64(m.snapshotInterval) - 1

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> uint8 Error

integer overflow conversion uint64 -> int64
Copy link
Collaborator

@Solovyov1796 Solovyov1796 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 17 of 17 files at r1, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @0g-wh)

@0g-wh 0g-wh merged commit 4ff4ba2 into 0glabs:0glabs-v0.47.10-release-x Sep 26, 2024
7 of 24 checks passed
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