pub fn read_transaction(db: &mut Db, tx_hash: &[u8; 32]) -> DbResult<Option<DbTransaction>> {

    if let Some((_, b)) = db.tx.get(tx_hash, SearchDepth::FullSearch)? {

        let sig_ptr = deserialize(&b[8..])?;

        let sigs = db.sig.get_value(sig_ptr)?;

        Ok(Some(DbTransaction {
            buffer: b,
            sigs: sigs
        }))
    }
    else {
        Ok(None)
    }
}
/// Reads the full transaction, and returns as owned DbTransaction
///
/// This does not yet decode the content
Reads the full transaction, and returns as owned DbTransaction
This does not yet decode the content
Reads the full transaction and returns as owned DbTransaction This does not yet decode the content
pub fn read_transaction(db: &mut Db, tx_hash: &[u8; 32]) -> DbResult<Option<DbTransaction>> {
    if let Some((_, b)) = db.tx.get(tx_hash, SearchDepth::FullSearch)? {
        let sig_ptr = deserialize(&b[8..])?;
        let sigs = db.sig.get_value(sig_ptr)?;
        Ok(Some(DbTransaction {
            buffer: b,
            sigs: sigs
        }))
    }
    else {
        Ok(None)
    }
}
pub fn read_transaction ( db : & mut Db , tx_hash : & [ u8 ; 32 ] ) -> DbResult < Option < DbTransaction > > { if let Some ( ( _ , b ) ) = db . tx . get ( tx_hash , SearchDepth :: FullSearch ) ? { let sig_ptr = deserialize ( & b [ 8 .. ] ) ? ; let sigs = db . sig . get_value ( sig_ptr ) ? ; Ok ( Some ( DbTransaction { buffer : b , sigs : sigs } ) ) } else { Ok ( None ) } }
Reads the full transaction, and returns as owned DbTransaction
This does not yet decode the content
Reads the full transaction and returns as owned DbTransaction This does not yet decode the content
db
&mut Db
tx_hash
&[u8; 32]
db
&mut Db
tx_hash
&[u8; 32]