-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat(store/v2): add SetInitialVersion in SC #18665
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -116,11 +116,7 @@ func (s *Store) SetMetrics(m metrics.Metrics) { | |||||||||||||||||||||||||
func (s *Store) SetInitialVersion(v uint64) error { | ||||||||||||||||||||||||||
s.initialVersion = v | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
// TODO(bez): Call SetInitialVersion on s.stateCommitment. | ||||||||||||||||||||||||||
// | ||||||||||||||||||||||||||
// Ref: https://github.com/cosmos/cosmos-sdk/issues/18597 | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
return nil | ||||||||||||||||||||||||||
return s.stateCommitment.SetInitialVersion(v) | ||||||||||||||||||||||||||
Comment on lines
116
to
+119
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The func (s *Store) SetInitialVersion(v uint64) error {
- s.initialVersion = v
return s.stateCommitment.SetInitialVersion(v)
} Committable suggestion
Suggested change
|
||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
// GetSCStore returns the store's state commitment (SC) backend. | ||||||||||||||||||||||||||
|
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.
The
SetInitialVersion
method does not handle the error that might be returned byt.tree.SetInitialVersion(version)
. It is important to handle this error to ensure that any issues with setting the initial version are properly reported and can be acted upon.Committable suggestion