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

Expose GetEngineManager from the chain Handler #1316

Merged
merged 2 commits into from
Apr 10, 2023
Merged

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

We need access to the engine manager to override the engine manager inside of the custom node testing framework.

How this works

Exposes GetEngineManager on the handler.Handler interface.

How this was tested

N/A

@StephenButtolph StephenButtolph added this to the v1.10.0 (Cortina) milestone Apr 10, 2023
@StephenButtolph StephenButtolph added consensus This involves consensus testing This primarily focuses on testing labels Apr 10, 2023
@StephenButtolph StephenButtolph self-assigned this Apr 10, 2023
@@ -169,6 +170,10 @@ func (h *handler) SetEngineManager(engineManager *EngineManager) {
h.engineManager = engineManager
}

func (h *handler) GetEngineManager() *EngineManager {
Copy link
Contributor

@joshua-kim joshua-kim Apr 10, 2023

Choose a reason for hiding this comment

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

I think we don't need to hold the ctx.Lock on Set since we only call it when setting up the chain (where the lock is already held in the caller), but do we need to hold the lock here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We only modify the value when calling SetEngineManager - so this var isn't written in other cases... so it should be fine not to lock here.

Copy link
Collaborator

@aaronbuchwald aaronbuchwald left a comment

Choose a reason for hiding this comment

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

lgtm

@StephenButtolph StephenButtolph merged commit 7ea0a7c into dev Apr 10, 2023
@StephenButtolph StephenButtolph deleted the get-engine-manager branch April 10, 2023 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus This involves consensus testing This primarily focuses on testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants