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 ProposeGenesisBlock() #3079

Merged
merged 3 commits into from Apr 12, 2023

Conversation

greymistcube
Copy link
Contributor

@greymistcube greymistcube commented Apr 11, 2023

In general, made ProposeGenesisBlock() accept a list of Transaction<T>s instead of a list of custom actions and system actions.

Notable "feature" changes due to this are:

  • ProposeGenesisBlock() is more generic than before. Transaction<T>s in a genesis Block<T> may have different signers. Also the caller now has more control over ordering of IActions to include.
  • ProposeGenesisBlock() can now produce a genesis Block<T> that is not suitable for BlockChain<T>.Create(). This can happen if provided Transaction<T>s are invalid for "appending" (i.e. wrong nonces).

I'll be dealing with #3078 in a follow-up PR as it seems a bit more complicated than it originally seemed. 🙄

@greymistcube greymistcube marked this pull request as ready for review April 12, 2023 01:17
@greymistcube greymistcube merged commit 4e9d2ca into planetarium:main Apr 12, 2023
16 of 17 checks passed
@greymistcube greymistcube deleted the refactor/block-propose branch May 2, 2023 05:16
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.

None yet

2 participants