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

Defer parser initialization to Start #1442

Merged
merged 5 commits into from
Apr 28, 2023
Merged

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented Apr 28, 2023

Why this should be merged

Resolves #1440

How this works

On the X-chain, the Snowman VM is not guaranteed to be Initialized until Start is called on the bootstrapper engine. When initializing the job parser it is possible to call ParseBlock, so initializing the job parser must be deferred until Start has been called.

How this was tested

TODO

@StephenButtolph StephenButtolph added the bug Something isn't working label Apr 28, 2023
@StephenButtolph StephenButtolph added this to the v1.10.1 milestone Apr 28, 2023
@StephenButtolph StephenButtolph self-assigned this Apr 28, 2023
@StephenButtolph StephenButtolph linked an issue Apr 28, 2023 that may be closed by this pull request
@StephenButtolph StephenButtolph added the consensus This involves consensus label Apr 28, 2023
@StephenButtolph StephenButtolph marked this pull request as ready for review April 28, 2023 20:06
@@ -45,7 +44,6 @@ func (p *parser) Parse(ctx context.Context, blkBytes []byte) (queue.Job, error)
}

type blockJob struct {
parser *parser
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't really part of this PR... but this was dead code and having it here made the test harder to make... win win removing it

@StephenButtolph StephenButtolph merged commit b007bdd into dev Apr 28, 2023
@StephenButtolph StephenButtolph deleted the defer-parser-initialization branch April 28, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working consensus This involves consensus
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

get panic while initializing (v1.10.0)
4 participants