Increase content-id length (#1725)
## Issue Addressed N/A ## Proposed Changes Increase gossipsub's content-id length to the full 32 byte hash. ## Additional Info N/A
This commit is contained in:
parent
6997776494
commit
a8c5af8874
@ -92,7 +92,7 @@ impl Default for Config {
|
|||||||
// The function used to generate a gossipsub message id
|
// The function used to generate a gossipsub message id
|
||||||
// We use the first 8 bytes of SHA256(data) for content addressing
|
// We use the first 8 bytes of SHA256(data) for content addressing
|
||||||
let gossip_message_id =
|
let gossip_message_id =
|
||||||
|message: &GossipsubMessage| MessageId::from(&Sha256::digest(&message.data)[..8]);
|
|message: &GossipsubMessage| MessageId::from(&Sha256::digest(&message.data)[..]);
|
||||||
|
|
||||||
// gossipsub configuration
|
// gossipsub configuration
|
||||||
// Note: The topics by default are sent as plain strings. Hashes are an optional
|
// Note: The topics by default are sent as plain strings. Hashes are an optional
|
||||||
|
Loading…
Reference in New Issue
Block a user