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:
Age Manning 2020-10-04 23:49:16 +00:00 committed by Paul Hauner
parent 6997776494
commit a8c5af8874
No known key found for this signature in database
GPG Key ID: 5E2CFF9B75FA63DF

View File

@ -92,7 +92,7 @@ impl Default for Config {
// The function used to generate a gossipsub message id
// We use the first 8 bytes of SHA256(data) for content addressing
let gossip_message_id =
|message: &GossipsubMessage| MessageId::from(&Sha256::digest(&message.data)[..8]);
|message: &GossipsubMessage| MessageId::from(&Sha256::digest(&message.data)[..]);
// gossipsub configuration
// Note: The topics by default are sent as plain strings. Hashes are an optional