Function avalanche_rs::utils::misc::generate_id [−][src]
pub fn generate_id(_raw_msg: &[u8]) -> String
We want to generate the TxId (readable format) for this Tx . In order to do so we need to :
- Generate a sha256 hash out of the bytes of the tx .
- Generate a sha256 out of the hash calculated in step 1
- Take the last 4 bytes of the hash from step 2 and push hash from step 1 et those 4 bytes in an array . Then return a base_58 string