-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[KS-372] Lazy initialize the registrysyncer #13787
Conversation
ae24258
to
72d2111
Compare
stopCh services.StopChan | ||
launchers []Launcher | ||
reader types.ContractReader | ||
initReader func(ctx context.Context, lggr logger.Logger, relayer contractReaderFactory, registryAddress string) (types.ContractReader, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/nit: it doesn't seem like this can be set by any caller. iiuc, then there would be less indirection to simply make it a static method on the syncer, or omit it entirely and call newReader in it's place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this mainly to make testing easier, such that a test could set initReader and set up a mock rather than setting up an actual chain reader.
Requires Dependencies
Resolves Dependencies