-
Notifications
You must be signed in to change notification settings - Fork 43
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
Derive Default
for MmrPeaks
#218
Conversation
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.
Humm, I had intentionally not derived Default
for this struct. Since I initially thought it wasn't a useful value. However, after our discussions about the Mmr lagging for a block, the genesis block must have a commitment to an the empty peaks.
I think we should also add some tests with this value, to make sure that are no off-by-one bugs lurking in the codebase.
@hackaugusto I changed it so that |
IMO for testing we should use the mock utilities: https://github.com/0xPolygonMiden/miden-base/tree/main/mock/src/mock These functions should take care of removing the boilerplate for data generation, while generating valid values. |
I would also prefer to avoid implementing Also, I believe using If however, doing |
Kudos, SonarCloud Quality Gate passed! |
Ah, you're right, items annotated with
Agreed |
Useful to create a dummy
MmrPeaks
value in tests