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

Blockchain: replace static constructors #3491

Merged
merged 7 commits into from
Jul 12, 2024
Merged

Conversation

ScottyPoi
Copy link
Contributor

@ScottyPoi ScottyPoi commented Jul 11, 2024

Works on #3487

Relates to #3489

Replaces all static Blockchain class methods with independently defined functions.

Moves constructor functions to packages/blockchain/src/constructors.ts

  • Blockchain.create(...) > createBlockchain(...)
  • Blockchain.fromBlocksData(...) > `createBlockchainFromBlocksData(...)

moves helper functions to packages/blockchain/src/helpers.ts

  • genGenesisStateRoot
  • getGenesisStateRoot

@jochem-brouwer
Copy link
Member

Is the target branch of this PR correct?

@holgerd77
Copy link
Member

Is the target branch of this PR correct?

Sure (?).

Did you miss the whole switching? We are now in breaking release develop mode for master.

@jochem-brouwer
Copy link
Member

I see, but is an insane amount of conflicting files, so I assumed that it was still the wrong branch.

@holgerd77
Copy link
Member

I see, but is an insane amount of conflicting files, so I assumed that it was still the wrong branch.

Ah, yeah, so we will do have to do with merge conflicts likely if we do all this broadly applying PRs with a lot of changes in many files. No way around that I guess! 🙂

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Cool, LGTM! 🎉

Will merge.

@holgerd77 holgerd77 merged commit 80434b7 into master Jul 12, 2024
34 checks passed
@holgerd77 holgerd77 deleted the Blockchain-static-methods branch July 12, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants