-
Notifications
You must be signed in to change notification settings - Fork 129
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
chore(dot/state): refactor NewTries
#2782
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b7fe0eb
to
8b8826d
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## development #2782 +/- ##
===============================================
- Coverage 63.09% 62.86% -0.24%
===============================================
Files 213 213
Lines 27061 27064 +3
===============================================
- Hits 17074 17013 -61
- Misses 8430 8495 +65
+ Partials 1557 1556 -1 |
EclesioMeloJunior
requested changes
Aug 25, 2022
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.
should you rebase development into this branch?
- `SetEmptyTrie` to set an empty trie without taking a state version argument - `SetTrie` to change `NewTries` constructor to NOT take a trie as input
f6adc97
to
2de5d47
Compare
EclesioMeloJunior
approved these changes
Aug 25, 2022
2de5d47
to
973b149
Compare
jimjbrettj
approved these changes
Aug 25, 2022
🎉 This PR is included in version 0.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
NewTries
does not return an error (always nil)NewTries
does not take an initial as argument (which won't get versioned)(*Tries) SetEmptyTrie()
method (which won't get versioned)(*Tries) SetTrie(*trie.Trie)
method (which will get versioned)This PR is because the empty trie is the same for v0 and v1 state versions.
So we want a method
SetEmptyTrie
on Tries which doesn't require a state version, and another methodSetTrie
which does.This allows to have way less code changes in the next chunky PR versioning trie calls.
Tests
go test -tags integration github.com/ChainSafe/gossamer
Issues
#2418
Primary Reviewer
@kishansagathiya