-
Notifications
You must be signed in to change notification settings - Fork 0
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
Eliminates dependency from Controller on BesuComponent #6
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
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.
PR Summary
This pull request eliminates the dependency of BesuController on BesuComponent, focusing on restructuring the BesuCommand and related classes to improve modularity and reduce coupling.
- Removed BesuComponent parameter from BesuCommand constructor in BesuCommand.java
- Updated BesuCommandModule to directly use BesuPluginContextImpl instead of BesuComponent
- Changed method name from getControllerBuilder() to setupControllerBuilder() in BlocksSubCommand and TrieLogSubCommand
- Modified BesuPluginContextModule to introduce a new method for providing BesuConfigurationImpl
- Removed @nAmed("besuPluginContext") annotation from getBesuPluginContext() method in BesuComponent interface
8 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
import org.hyperledger.besu.services.BesuPluginContextImpl; | ||
|
||
import javax.inject.Named; | ||
import javax.inject.Singleton; |
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.
logic: The @nAmed annotation has been removed. This might affect dependency injection in other parts of the codebase.
public BesuPluginContextImpl provideBesuPluginContext() { | ||
return new BesuPluginContextImpl(); | ||
public BesuPluginContextImpl provideBesuPluginContext(final BesuConfigurationImpl pluginConfig) { | ||
BesuPluginContextImpl retval = new BesuPluginContextImpl(); |
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.
style: 'retval' doesn't follow Java naming conventions. Rename to 'pluginContext'.
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.
PR Summary
(updates since last review)
This pull request continues to eliminate the dependency of BesuController on BesuComponent, focusing on restructuring the BesuControllerBuilder class to improve modularity and reduce coupling.
- Removed BesuComponent parameter from BesuControllerBuilder in BesuControllerBuilder.java
- Updated BesuControllerBuilder to directly use BonsaiCachedMerkleTrieLoader and BlobCache instead of obtaining them from BesuComponent
- Simplified the build() method in BesuControllerBuilder by removing references to BesuComponent
- Removed the besuComponent() method from BesuControllerBuilder, as it's no longer needed
No file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
test greptile pr bot