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

Add bootstrap manager. #2326

Merged
merged 14 commits into from
Jul 13, 2022
Merged

Add bootstrap manager. #2326

merged 14 commits into from
Jul 13, 2022

Conversation

piotrm50
Copy link
Contributor

Description of change

Add bootstrap manager that keeps track of bootstrap status of tangle and notarization manager and triggers an event when both are bootstrapped.

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • My code follows the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@piotrm50 piotrm50 requested a review from karimodm July 12, 2022 13:10
@piotrm50 piotrm50 temporarily deployed to feature July 12, 2022 13:22 Inactive
Copy link
Contributor

@karimodm karimodm left a comment

Choose a reason for hiding this comment

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

Awesome! Just a few minor comments.

packages/tangle/timemanager.go Outdated Show resolved Hide resolved
packages/notarization/manager.go Outdated Show resolved Hide resolved
packages/bootstrapmanager/manager.go Outdated Show resolved Hide resolved
@piotrm50 piotrm50 temporarily deployed to feature July 12, 2022 16:18 Inactive
@piotrm50 piotrm50 requested a review from karimodm July 13, 2022 07:42
Comment on lines +23 to +28
type dependencies struct {
dig.In

Tangle *tangle.Tangle
NotarizationMgr *notarization.Manager
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are those needed?

Copy link
Contributor Author

@piotrm50 piotrm50 Jul 13, 2022

Choose a reason for hiding this comment

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

dependencies are needed to create an instance of the Manager by calling newManager function. This is handled internally by dig library. pluginDeps is needed so that we can call pluginDeps.BootstrapManager.Setup() in the configure method. If I put it in pluginDeps as a parameter to newManager, it caused a cyclic dependency or something and didn't work.

@piotrm50 piotrm50 temporarily deployed to feature July 13, 2022 09:35 Inactive
@piotrm50 piotrm50 requested review from karimodm and removed request for karimodm July 13, 2022 10:39
@piotrm50 piotrm50 dismissed karimodm’s stale review July 13, 2022 10:40

github has a problem and can't merge

@piotrm50 piotrm50 merged commit f186140 into develop Jul 13, 2022
@piotrm50 piotrm50 deleted the fix/bootstrapped-status branch July 13, 2022 10:41
@piotrm50 piotrm50 mentioned this pull request Jul 14, 2022
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.

3 participants