pub fn read_msg_cids<DB>(db: &DB, msg_cid: &Cid) -> Result<(Vec<Cid>, Vec<Cid>), Error>
where
    DB: BlockStore,
{
    if let Some(roots) = db
        .get::<TxMeta>(msg_cid)
        .map_err(|e| Error::Other(e.to_string()))?
    {
        let bls_cids = read_amt_cids(db, &roots.bls_message_root)?;
        let secpk_cids = read_amt_cids(db, &roots.secp_message_root)?;
        Ok((bls_cids, secpk_cids))
    } else {
        Err(Error::UndefinedKey(format!(
            "no msg root with cid {}",
            msg_cid
        )))
    }
}
/// Returns a tuple of cids for both Unsigned and Signed messages
// TODO cache these recent meta roots
Returns a tuple of cids for both Unsigned and Signed messages
TODO cache these recent meta roots
Returns a tuple of cids for both Unsigned and Signed messages TODO cache these recent meta roots
pub fn read_msg_cids<DB>(db: &DB, msg_cid: &Cid) -> Result<(Vec<Cid>, Vec<Cid>), Error>
where
    DB: BlockStore,
{
    if let Some(roots) = db
        .get::<TxMeta>(msg_cid)
        .map_err(|e| Error::Other(e.to_string()))?
    {
        let bls_cids = read_amt_cids(db, &roots.bls_message_root)?;
        let secpk_cids = read_amt_cids(db, &roots.secp_message_root)?;
        Ok((bls_cids, secpk_cids))
    } else {
        Err(Error::UndefinedKey(format!(
            "no msg root with cid {}",
            msg_cid
        )))
    }
}
pub fn read_msg_cids < DB > ( db : & DB , msg_cid : & Cid ) -> Result < ( Vec < Cid > , Vec < Cid > ) , Error > where DB : BlockStore , { if let Some ( roots ) = db . get :: < TxMeta > ( msg_cid ) . map_err ( | e | Error :: Other ( e . to_string ( ) ) ) ? { let bls_cids = read_amt_cids ( db , & roots . bls_message_root ) ? ; let secpk_cids = read_amt_cids ( db , & roots . secp_message_root ) ? ; Ok ( ( bls_cids , secpk_cids ) ) } else { Err ( Error :: UndefinedKey ( format ! ( " " msg_cid ) ) ) } }
Returns a tuple of cids for both Unsigned and Signed messages
TODO cache these recent meta roots
Returns a tuple of cids for both Unsigned and Signed messages TODO cache these recent meta roots
db
&DB
msg_cid
&Cid