[Enhancement] Add MerkleRoot type alias for []byte with Sum method #37
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.
Summary
Human Summary
MerkleRoot
[]byte
aliasSum(bool)
method to the type to get the sum from the trieAI Summary
Summary generated by Reviewpad on 09 Jan 24 20:24 UTC
This pull request includes changes to the documentation files
merkle-sum-trie.md
andsmt.md
, as well as the test fileroot_test.go
, the code filesmst.go
, and the types filetypes.go
.The changes to the documentation files add a new section called "Roots" that explains the root of the tree and provides helper functions for interacting with the root.
The changes to the test file add tests for the
MerkleRoot
type and theSum()
function.The changes to the code file add a new method
Root()
that returns the root hash of the trie as aMerkleRoot
type.The changes to the types file add a new type
MerkleRoot
that is a byte slice representing the root hash, and aSum()
method for computing the sum of the root hash.Issue
N/A
Type of change
Please mark the relevant option(s):
Testing
make test_all
make benchmark_{all | suite name}
Required Checklist
godoc
format comments see: tip.golang.org/doc/comment)If Applicable Checklist