pub fn compute_msg_meta<DB: BlockStore>(
    blockstore: &DB,
    bls_msgs: &[UnsignedMessage],
    secp_msgs: &[SignedMessage],
) -> Result<Cid, Error> {
    // collect bls and secp cids
    let bls_cids = cids_from_messages(bls_msgs)?;
    let secp_cids = cids_from_messages(secp_msgs)?;

    // generate Amt and batch set message values
    let bls_root = Amt::new_from_slice(blockstore, &bls_cids)?;
    let secp_root = Amt::new_from_slice(blockstore, &secp_cids)?;

    let meta = TxMeta {
        bls_message_root: bls_root,
        secp_message_root: secp_root,
    };

    // store message roots and receive meta_root cid
    let meta_root = blockstore
        .put(&meta, Blake2b256)
        .map_err(|e| Error::Other(e.to_string()))?;

    Ok(meta_root)
}
/// Returns message root CID from bls and secp message contained in the param Block
Returns message root CID from bls and secp message contained in the param Block
Returns message root CID from bls and secp message contained in the param Block
pub fn compute_msg_meta<DB: BlockStore>(
    blockstore: &DB,
    bls_msgs: &[UnsignedMessage],
    secp_msgs: &[SignedMessage],
) -> Result<Cid, Error> {
    // collect bls and secp cids
    let bls_cids = cids_from_messages(bls_msgs)?;
    let secp_cids = cids_from_messages(secp_msgs)?;
    // generate Amt and batch set message values
    let bls_root = Amt::new_from_slice(blockstore, &bls_cids)?;
    let secp_root = Amt::new_from_slice(blockstore, &secp_cids)?;
    let meta = TxMeta {
        bls_message_root: bls_root,
        secp_message_root: secp_root,
    };
    // store message roots and receive meta_root cid
    let meta_root = blockstore
        .put(&meta, Blake2b256)
        .map_err(|e| Error::Other(e.to_string()))?;
    Ok(meta_root)
}
pub fn compute_msg_meta < DB : BlockStore > ( blockstore : & DB , bls_msgs : & [ UnsignedMessage ] , secp_msgs : & [ SignedMessage ] , ) -> Result < Cid , Error > { // collect bls and secp cids let bls_cids = cids_from_messages ( bls_msgs ) ? ; let secp_cids = cids_from_messages ( secp_msgs ) ? ; // generate Amt and batch set message values let bls_root = Amt :: new_from_slice ( blockstore , & bls_cids ) ? ; let secp_root = Amt :: new_from_slice ( blockstore , & secp_cids ) ? ; let meta = TxMeta { bls_message_root : bls_root , secp_message_root : secp_root , } ; // store message roots and receive meta_root cid let meta_root = blockstore . put ( & meta , Blake2b256 ) . map_err ( | e | Error :: Other ( e . to_string ( ) ) ) ? ; Ok ( meta_root ) }
Returns message root CID from bls and secp message contained in the param Block
Returns message root CID from bls and secp message contained in the param Block
blockstore
&DB
bls_msgs
&[UnsignedMessage]
secp_msgs
&[SignedMessage]