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

Rename emap interface method names #1806

Merged
merged 5 commits into from
Nov 22, 2024
Merged

Conversation

tsachiherman
Copy link
Contributor

@tsachiherman tsachiherman commented Nov 21, 2024

What ?

As part of having the shared validitywindow implementation being used within the dsmr, the entries that would be contained would be better off implementing the same interface.

The dsmr's interface ( i.e. Tx ) already using GetID() and GetExpiry(), which seems to be "better" compared to the emap.Item's ID() and Expiry() as there would clash with member names.

This PR is a followup on #1782, and part of Generalize expiry based de-duplication

joshua-kim
joshua-kim previously approved these changes Nov 21, 2024
Copy link
Contributor

@joshua-kim joshua-kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One pro of this is that the interface function name is unlikely to collide w/ field names (e.g ID is a common field name).

@aaronbuchwald
Copy link
Collaborator

We should be consistent throughout the codebase between using ID() and GetID() imo. We are bound to use ID() to implement snowman.Block interface from AvalancheGo, but could push everything else to switch to GetID(), which would be fine imo.

@tsachiherman tsachiherman merged commit 910dd46 into main Nov 22, 2024
17 checks passed
@tsachiherman tsachiherman deleted the tsachi/refactor_validity_window2 branch November 22, 2024 15:23
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

Successfully merging this pull request may close these issues.

3 participants