Repository navigation
Conversation
leolara
force-pushed
the
leolara/lmd-finalizer
branch
4 times, most recently
from
June 28, 2022 07:57
eb2c76b to
fafc325
Compare
leolara
force-pushed
the
leolara/lmd-finalizer
branch
from
June 29, 2022 13:10
fafc325 to
1d713fa
Compare
mcdee
reviewed
Jul 13, 2022
| } | ||
|
|
||
| // New LMDFinalizer with logger `log`. | ||
| func New(latestFinalized *chaindb.Block, log zerolog.Logger, handler newLFBHandler) LMDFinalizer { |
Contributor
There was a problem hiding this comment.
This is already starting to be overloaded with parameters. Using the .WithX() parameter system that is used in other modules in chaind would make this easier to use.
Author
There was a problem hiding this comment.
The first two are kind of mandatory. I guess I can make log optional. Do you want me to add a WithX() for latestFinalized?
Contributor
There was a problem hiding this comment.
Yes, ideally everything but the context would be a parameter as it makes future changes significantly easier to manager (for example, if we wanted to allow multiple handlers we could just add a WithHandlers() alongside the additional WithHandler() and it would not break any existing code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.