-
Notifications
You must be signed in to change notification settings - Fork 2
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
upgrade to iavl 1.2.0 #13
Conversation
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
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
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
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
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
There was a problem hiding this 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)
4ff4ba2
into
0glabs:0glabs-v0.47.10-release-x
This change is