-
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(trie): Node HashDigest
-> MerkleValue
#2724
Conversation
Codecov Report
@@ Coverage Diff @@
## development #2724 +/- ##
===============================================
- Coverage 62.93% 62.78% -0.15%
===============================================
Files 212 212
Lines 27020 27020
===============================================
- Hits 17004 16965 -39
- Misses 8472 8511 +39
Partials 1544 1544 |
internal/trie/node/hash.go
Outdated
@@ -13,8 +13,8 @@ import ( | |||
// EncodeAndHash returns the encoding of the node and | |||
// the Merkle value of the node. | |||
func (n *Node) EncodeAndHash() (encoding, hash []byte, err 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.
note hash
argument is renamed to merkleValue
in #2725
@@ -101,7 +101,7 @@ func updateGeneration(currentNode *Node, trieGeneration uint64, | |||
|
|||
// The hash of the node from a previous snapshotted trie | |||
// is usually already computed. | |||
deletedHashBytes := currentNode.HashDigest | |||
deletedHashBytes := currentNode.MerkleValue |
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.
note this is changed in #2725
🎉 This PR is included in version 0.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Changes
Polkadot spec refers to it as merkle value, and even in the implementation it's not always a hash digest, it can also be the encoding itself if the node is not the trie root and its encoding is <= 32 bytes.
Tests
Issues
Primary Reviewer
@jimjbrettj