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(testnode): create genTx on Export (backport #3673) #3691

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 16, 2024

Closes #3662

Before, genTx transactions were created prematurely via WithValidators which was problematic if a user tried to later override the chainID via WithChainID because the genTx transactions would use the default chain ID but the state machine would be created with a custom chain ID.

This PR refactors the genTx creation to happen only when genesis.Export is invoked which is after a user configures a custom chain ID.


This is an automatic backport of pull request #3673 done by Mergify.

Closes #3662

Before, genTx transactions were created prematurely via
[`WithValidators`](https://github.com/rootulp/celestia-app/blob/34cd4b34d99e27c5e8611abab6aaecc550499045/test/util/testnode/config.go#L123)
which was problematic if a user tried to later override the chainID via
`WithChainID` because the genTx transactions would use the default chain
ID but the state machine would be created with a custom chain ID.

This PR refactors the genTx creation to happen only when
`genesis.Export` is invoked which is _after_ a user configures a custom
chain ID.

(cherry picked from commit 1703fe2)
@mergify mergify bot requested a review from a team as a code owner July 16, 2024 21:04
@mergify mergify bot requested review from rootulp and evan-forbes July 16, 2024 21:04
@github-actions github-actions bot added the bot item was created by a bot label Jul 16, 2024
@rootulp
Copy link
Collaborator

rootulp commented Jul 16, 2024

Closing this and combining it with #3689 because tests will fail there until this is merged.

@rootulp rootulp closed this Jul 16, 2024
@mergify mergify bot deleted the mergify/bp/v2.x/pr-3673 branch July 16, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot item was created by a bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant