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

Consider Declaring the Interface Factory locally #498

Open
EmilGeorgiev opened this issue May 20, 2024 · 0 comments
Open

Consider Declaring the Interface Factory locally #498

EmilGeorgiev opened this issue May 20, 2024 · 0 comments

Comments

@EmilGeorgiev
Copy link

EmilGeorgiev commented May 20, 2024

The interface mev.Factory is currently used in the package abci/checktx. I believe it would be better for the abci/checktx package to declare its own interface because:

  1. The abci/checktx package doesn't use all the methods of the mev.Factory interface. It would be more efficient to declare an interface that suits its specific needs.

  2. By declaring its own interface, the abci/checktx package can avoid importing the dependency on mev.Factory.

  3. This approach follows Go best practices as outlined here Go Style Guide - Interfaces.

@EmilGeorgiev EmilGeorgiev changed the title Consider declaration and usage of the interface of the interface Consider Declaring the Interface mev.Factory Locally May 20, 2024
@EmilGeorgiev EmilGeorgiev changed the title Consider Declaring the Interface mev.Factory Locally Consider Declaring the Interface Factory locally May 20, 2024
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

No branches or pull requests

1 participant