-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
The id is a Blake2b hash, ref:
pub async fn build(&self, message_bytes: &[u8]) -> StdResult<DmqMsg> {
fn compute_msg_id(dmq_message: &DmqMsg) -> Vec<u8> {
let mut hasher = Blake2b::<U64>::new();
hasher.update(&dmq_message.msg_body);
hasher.update(dmq_message.block_number.to_be_bytes());
hasher.update(dmq_message.ttl.to_be_bytes());
hasher.update(&dmq_message.kes_signature);
hasher.update(&dmq_message.operational_certificate);
hasher.update(dmq_message.kes_period.to_be_bytes());
hasher.finalize().to_vec()
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status