Skip to content
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

refactor: MerkleRoot#Sum() as MerkleRoot#MustSum() #50

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Jul 10, 2024

Summary

  • Refactors MerkleRoot#Sum() to return an error argument.
  • Adds MerkleRoot#MustSum() which behaves as MerkleRoot#Sum() previously did.

Human Summary

AI Summary

reviewpad:summary

Issue

Fixes pokt-network/poktroll#584

We need proper error handling in consumer code where the root has not been checked for validity.

Type of change

Please mark the relevant option(s):

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

  • Run all unit tests: make test_all
  • Run all/relevant benchmarks (if optimising): make benchmark_{all | suite name}

Required Checklist

If Applicable Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have updated any relevant README(s)/documentation and left TODOs throughout the codebase
  • Add or update any relevant or supporting mermaid diagrams

@bryanchriswhite bryanchriswhite added enhancement New feature or request small Pull request is small code health Related to code cleanup and health of the repo labels Jul 10, 2024
@bryanchriswhite bryanchriswhite self-assigned this Jul 10, 2024
@bryanchriswhite bryanchriswhite marked this pull request as ready for review July 10, 2024 21:22
@bryanchriswhite bryanchriswhite merged commit 6c22c94 into main Jul 12, 2024
2 checks passed
@bryanchriswhite bryanchriswhite deleted the refactor/root/sum branch July 12, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Related to code cleanup and health of the repo enhancement New feature or request small Pull request is small
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[TODO] @Olshansk's (and now @Bryan's) Blocker TODOs
2 participants