pub fn enclave_produce_blocks(
    eid: sgx_enclave_id_t,
    blocks_to_sync: Vec<SignedBlock>,
    tee_nonce: u32,
) -> SgxResult<()> {
    let mut status = sgx_status_t::SGX_SUCCESS;

    let result = unsafe {
        blocks_to_sync
            .using_encoded(|b| produce_blocks(eid, &mut status, b.as_ptr(), b.len(), &tee_nonce))
    };

    if status != sgx_status_t::SGX_SUCCESS {
        return Err(status);
    }
    if result != sgx_status_t::SGX_SUCCESS {
        return Err(result);
    }

    Ok(())
}
/// Starts block production within enclave
///
/// Returns the produced blocks
Starts block production within enclave
Returns the produced blocks
Starts block production within enclave Returns the produced blocks
pub fn enclave_produce_blocks(
    eid: sgx_enclave_id_t,
    blocks_to_sync: Vec<SignedBlock>,
    tee_nonce: u32,
) -> SgxResult<()> {
    let mut status = sgx_status_t::SGX_SUCCESS;
    let result = unsafe {
        blocks_to_sync
            .using_encoded(|b| produce_blocks(eid, &mut status, b.as_ptr(), b.len(), &tee_nonce))
    };
    if status != sgx_status_t::SGX_SUCCESS {
        return Err(status);
    }
    if result != sgx_status_t::SGX_SUCCESS {
        return Err(result);
    }
    Ok(())
}
pub fn enclave_produce_blocks ( eid : sgx_enclave_id_t , blocks_to_sync : Vec < SignedBlock > , tee_nonce : u32 , ) -> SgxResult < ( ) > { let mut status = sgx_status_t :: SGX_SUCCESS ; let result = unsafe { blocks_to_sync . using_encoded ( | b | produce_blocks ( eid , & mut status , b . as_ptr ( ) , b . len ( ) , & tee_nonce ) ) } ; if status != sgx_status_t :: SGX_SUCCESS { return Err ( status ) ; } if result != sgx_status_t :: SGX_SUCCESS { return Err ( result ) ; } Ok ( ( ) ) }
Starts block production within enclave
Returns the produced blocks
Starts block production within enclave Returns the produced blocks
eid
sgx_enclave_id_t
blocks_to_sync
Vec<SignedBlock>
tee_nonce
u32
eid
sgx_enclave_id_t
blocks_to_sync
Vec<SignedBlock>
tee_nonce
u32