Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

feat: add Hash,[Partial]Eq to test utils #2077

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

giladchase
Copy link
Collaborator

@giladchase giladchase commented Jul 11, 2024

This is useful for aggregator objects that want to keep track (via hashmap) of the number of contracts initialized inside a test.

In particular, a soon-to-be-added TransactionGenerator object will use this.


This change is Reviewable

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware, @giladchase, and @Yael-Starkware)


crates/blockifier/src/test_utils.rs line 50 at r1 (raw file):

                                       erc20_contract_without_some_syscalls_compiled.json";

#[derive(Clone, Hash, PartialEq, Eq, Copy, Debug)]

Alphabetize?
What does Hash mean exactly here?
x2

Code quote:

Clone, Hash, PartialEq, Eq, Copy, Debug

elintul
elintul previously approved these changes Jul 13, 2024
Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware, @giladchase, and @Yael-Starkware)

This is useful for aggregator objects that want to keep track (via
hashmap) of the number of contracts initialized inside a test.

In particular, a soon-to-be-added TransactionGenerator object will use
this.
Copy link
Collaborator Author

@giladchase giladchase left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @dorimedini-starkware, @elintul, and @Yael-Starkware)


crates/blockifier/src/test_utils.rs line 50 at r1 (raw file):

Previously, elintul (Elin) wrote…

Alphabetize?
What does Hash mean exactly here?
x2

Done, kept Eq next to PartialEq though, they like it that way I think.

Hash makes it possible for FeatureContract to be a key in a hashmap.

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware and @Yael-Starkware)

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Yael-Starkware)

@giladchase giladchase merged commit 32191d4 into main Jul 14, 2024
11 checks passed
@giladchase giladchase deleted the gilad/add-hash-derives-to-feature-contract branch July 14, 2024 10:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants