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

fix: avoids copying in the commit method #12

Merged
merged 5 commits into from May 31, 2022

Conversation

therustmonk
Copy link
Contributor

@therustmonk therustmonk commented May 31, 2022

The PR improves PedersenGens::commit method:

  • Internal copying: avoid copying values inside the method (use iters)
  • External copying: avoid copying on calls (support AsRef<Scalar> args)

UPD: The Borrow trait used (instead of AsRef), because it's the requirement of the multiscalar_mul method in the curve25519-dalek crate.

Copy link
Contributor

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - solves #9
(tests need to be updated, .commit( in tests needs a reference, as per cargo clippy --all-targets -- -D warnings)

@stringhandler stringhandler merged commit ab4c432 into tari-project:main May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants