pub fn hash_network(network_id_string: &str) -> Result<u64> {
    let bytes = Blake2b256::digest(network_id_string.as_bytes())[0..8]
        .try_into()
        .map_err(|_e| Error::Blake2b256Error("Hashing the network id failed."))?;

    Ok(u64::from_le_bytes(bytes))
}
/// Hash the network id str from the nodeinfo to an u64 for the messageBuilder
Hash the network id str from the nodeinfo to an u64 for the messageBuilder
Hash the network id str from the nodeinfo to an u64 for the messageBuilder
pub fn hash_network(network_id_string: &str) -> Result<u64> {
    let bytes = Blake2b256::digest(network_id_string.as_bytes())[0..8]
        .try_into()
        .map_err(|_e| Error::Blake2b256Error("Hashing the network id failed."))?;
    Ok(u64::from_le_bytes(bytes))
}
pub fn hash_network ( network_id_string : & str ) -> Result < u64 > { let bytes = Blake2b256 :: digest ( network_id_string . as_bytes ( ) ) [ 0 .. 8 ] . try_into ( ) . map_err ( | _e | Error :: Blake2b256Error ( " " ) ) ? ; Ok ( u64 :: from_le_bytes ( bytes ) ) }
Hash the network id str from the nodeinfo to an u64 for the messageBuilder
Hash the network id str from the nodeinfo to an u64 for the messageBuilder
network_id_string
&str
network_id_string
&str