Skip to content

clean up contract leaf is empty checks#716

Merged
rahul-kothari merged 2 commits into
masterfrom
rk/is_empty_contractdata
Jun 5, 2023
Merged

clean up contract leaf is empty checks#716
rahul-kothari merged 2 commits into
masterfrom
rk/is_empty_contractdata

Conversation

@rahul-kothari
Copy link
Copy Markdown
Contributor

Description

Fix #459

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • The branch has been merged or rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.

Copy link
Copy Markdown
Member

@Maddiaa0 Maddiaa0 left a comment

Choose a reason for hiding this comment

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

lgtm, once the linting stuff is taken care of lets merge!

Copy link
Copy Markdown
Contributor

@LHerskind LHerskind left a comment

Choose a reason for hiding this comment

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

Tiny nitpicks

{ contract_data.contract_address, contract_data.portal_contract_address, contract_data.function_tree_root },
GeneratorIndex::CONTRACT_LEAF);
if (contract_data.contract_address != 0) {
auto contract_leaf = contract_data.hash();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need the contract_leaf for anything but the update_element()? Seems like it could be moved into the if or moved all the way in.

Similar for some of the above.

@rahul-kothari rahul-kothari force-pushed the rk/is_empty_contractdata branch from c14774d to 9ec0d38 Compare June 5, 2023 12:14
@rahul-kothari rahul-kothari force-pushed the rk/is_empty_contractdata branch from 9ec0d38 to 976cfd4 Compare June 5, 2023 12:48
@rahul-kothari rahul-kothari merged commit 8d66e94 into master Jun 5, 2023
@rahul-kothari rahul-kothari deleted the rk/is_empty_contractdata branch June 5, 2023 13:50
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.

Use is_empty for contract leafs

3 participants