/// The function converts a `EcdsaMessage` into an advert for a
/// `EcdsaArtifact`.
The function converts a `EcdsaMessage` into an advert for a
`EcdsaArtifact`.
The function converts a ` EcdsaMessage ` into an advert for a ` EcdsaArtifact ` .
fn message_to_advert(msg: &EcdsaMessage) -> Advert<EcdsaArtifact> {
        // TODO: use serialize_len() in all the clients
        let size = bincode::serialize(msg).unwrap().len();
        Advert {
            id: ecdsa_msg_hash(msg),
            attribute: EcdsaMessageAttribute::from(msg),
            size,
            integrity_hash: ic_crypto::crypto_hash(msg).get(),
        }
    }
fn message_to_advert ( msg : & EcdsaMessage ) -> Advert < EcdsaArtifact > { // TODO: use serialize_len() in all the clients let size = bincode :: serialize ( msg ) . unwrap ( ) . len ( ) ; Advert { id : ecdsa_msg_hash ( msg ) , attribute : EcdsaMessageAttribute :: from ( msg ) , size , integrity_hash : ic_crypto :: crypto_hash ( msg ) . get ( ) , } }
The function converts a `EcdsaMessage` into an advert for a
`EcdsaArtifact`.
The function converts a ` EcdsaMessage ` into an advert for a ` EcdsaArtifact ` .
msg
&EcdsaMessage