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 - move tree initializer to its own module. #740

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

piohei
Copy link
Contributor

@piohei piohei commented Jun 3, 2024

Motivation

In some cases it was hard to figure out startup flow. These PR moves tree initializer to its own module to hide this logic from the flow. It is also first step of code cleanup before the upcoming changes (no status stored, HA).

Solution

PR Checklist

  • Added Tests
  • Added Documentation

@piohei piohei requested a review from a team as a code owner June 3, 2024 10:15
@@ -29,6 +30,8 @@ pub struct Database {
pub pool: Pool<Postgres>,
}

pub type SharedDatabase = Arc<Database>;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just wanted to follow the pattern from here https://github.com/reilabs/signup-sequencer/blob/piohei/refactor_1/src/contracts/mod.rs#L475. If we don't want to use Shared prefix I would rather also change it here to be consistent.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good, let's also change it there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shared prefix removed in favor of Arc. :)

@@ -0,0 +1 @@
pub mod validator;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also moved other modules to agreed new structure (mod.rs inside directory).

@piohei piohei force-pushed the piohei/refactor_1 branch from 0ae466a to 8ca22ab Compare June 4, 2024 07:07
@cichaczem cichaczem merged commit bf5d0ff into worldcoin:main Jun 5, 2024
3 checks passed
@piohei piohei deleted the piohei/refactor_1 branch June 24, 2024 11:44
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.

3 participants