Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant