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

feat: Rename federation_id() to calculate_federation_id() #4506

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

benthecarman
Copy link
Contributor

The name federation_id() makes it sound like it is just retrieving the id, however it is actually calculating a hash and can take a mild amount of cpu power. Renaming this to calculate_federation_id() implies that there is some work being done and the user should instantiate it as a variable to not duplicate that work.

Found a place where this was happening in the codebase already. We did this in several places in Mutiny too.

The name federation_id() makes it sound like it is just retrieving the
id, however it is actually calculating a hash and can take a mild amount
of cpu power. Renaming this to calculate_federation_id() implies that
there is some work being done and the user should instantiate it as a
variable to not duplicate that work.

Found a place where this was happening in the codebase already. We did
this in serveral places in Mutiny too.
@benthecarman benthecarman requested review from a team as code owners March 8, 2024 17:16
Copy link
Member

@Kodylow Kodylow left a comment

Choose a reason for hiding this comment

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

ACK

@dpc dpc added this pull request to the merge queue Mar 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 8, 2024
@dpc dpc added this pull request to the merge queue Mar 8, 2024
Merged via the queue into fedimint:master with commit ac27893 Mar 8, 2024
20 checks passed
@benthecarman benthecarman deleted the calc-fedimint-id branch March 8, 2024 23:19
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.

None yet

3 participants