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
parent 86a18e72c4
commit 6b68c628df

View File

@ -84,7 +84,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