/// The function converts a `DkgMessage` into an advert for a
/// `DkgArtifact`.
The function converts a `DkgMessage` into an advert for a
`DkgArtifact`.
The function converts a ` DkgMessage ` into an advert for a ` DkgArtifact ` .
fn message_to_advert(msg: &DkgMessage) -> Advert<DkgArtifact> {
        let size = bincode::serialize(msg).unwrap().len();
        let attribute = DkgMessageAttribute {
            interval_start_height: msg.content.dkg_id.start_block_height,
        };
        let hash = ic_crypto::crypto_hash(msg);
        Advert {
            id: hash.clone(),
            attribute,
            size,
            integrity_hash: hash.get(),
        }
    }
fn message_to_advert ( msg : & DkgMessage ) -> Advert < DkgArtifact > { let size = bincode :: serialize ( msg ) . unwrap ( ) . len ( ) ; let attribute = DkgMessageAttribute { interval_start_height : msg . content . dkg_id . start_block_height , } ; let hash = ic_crypto :: crypto_hash ( msg ) ; Advert { id : hash . clone ( ) , attribute , size , integrity_hash : hash . get ( ) , } }
The function converts a `DkgMessage` into an advert for a
`DkgArtifact`.
The function converts a ` DkgMessage ` into an advert for a ` DkgArtifact ` .
msg
&DkgMessage