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

MultiAddress Display update #1790

Merged
merged 6 commits into from
Dec 20, 2023
Merged

Conversation

kwek20
Copy link
Contributor

@kwek20 kwek20 commented Dec 18, 2023

Description of change

Changes MultiAddress Display to show the hashed total of its addresses instead of the addresses themselves

Fixes #1587

@kwek20 kwek20 changed the title mutli display MultiAddress Display update Dec 18, 2023

/// Hash the [`MultiAddress`] with BLAKE2b-256.
#[inline(always)]
pub fn hash(&self) -> [u8; 32] {
Copy link
Contributor

Choose a reason for hiding this comment

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

why pub? users gonna need to work with the hash of it?

Copy link
Member

Choose a reason for hiding this comment

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

I asked myself the same but since it's public anyway through the display I think it's fair to have the method pub

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, figured it wouldnt hurt to have available

@thibault-martinez thibault-martinez merged commit 88ed0bf into iotaledger:2.0 Dec 20, 2023
27 of 36 checks passed
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