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: use sha256 utils #256

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bloomingpeach
Copy link
Contributor

@bloomingpeach bloomingpeach commented Oct 10, 2024

  • issue #
  • follows contribution guide
  • code change includes tests

Description

When I working on fixing the test, I came across this improvement. This PR uses sha256_byte_array helper where possible

Copy link

vercel bot commented Oct 10, 2024

@bloomingpeach is attempting to deploy a commit to the keep-starknet-strange Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@b-j-roberts b-j-roberts left a comment

Choose a reason for hiding this comment

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

Nice catch! Just one nit

};
engine.dstack.push_byte_array(res2_bytes);
let res = sha256_byte_array(@m);
let res2 = sha256_byte_array(@res);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you change this one to use double sha?

pub fn double_sha256(byte: @ByteArray) -> u256 {

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.

2 participants