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

Small additions to libp2p #278

Merged
merged 4 commits into from
Aug 1, 2023
Merged

Small additions to libp2p #278

merged 4 commits into from
Aug 1, 2023

Conversation

Copy link
Contributor

@youngjoon-lee youngjoon-lee left a comment

Choose a reason for hiding this comment

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

thank you!

Comment on lines 91 to 97
.message_id_fn(|message| {
use blake2::digest::{consts::U32, Digest};
use blake2::Blake2b;
let mut hasher = Blake2b::<U32>::new();
hasher.update(&message.data);
gossipsub::MessageId::from(hasher.finalize().to_vec())
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick: Can we make a function for this?

@zeegomo zeegomo merged commit f21f1ea into master Aug 1, 2023
2 checks passed
zeegomo added a commit that referenced this pull request Aug 3, 2023
* Add initial peer config to nomos-libp2p

* Use custom message id to avoid duplicates

* Expose reference to the inner swarm

* move closure into function
@jakubgs jakubgs deleted the libp2p-adds branch February 15, 2024 09:32
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