pub(crate) async fn process_client_transaction_submission<V>(
    smp: SharedMempool<V>,
    transaction: SignedTransaction,
    callback: oneshot::Sender<Result<SubmissionStatus>>,
) where
    V: TransactionValidation,
{
    let mut statuses =
        process_incoming_transactions(&smp, vec![transaction], TimelineState::NotReady).await;
    log_txn_process_results(statuses.clone(), None);
    let status;
    if statuses.is_empty() {
        error!("[shared mempool] missing status for client transaction submission");
        return;
    } else {
        status = statuses.remove(0);
    }

    if let Err(e) = callback
        .send(Ok(status))
        .map_err(|_| format_err!("[shared mempool] timeout on callback send to AC endpoint"))
    {
        error!("[shared mempool] failed to send back transaction submission result to AC endpoint with error: {:?}", e);
    }
}
/// processes transactions directly submitted by client
processes transactions directly submitted by client
processes transactions directly submitted by client
pub(crate) async fn process_client_transaction_submission<V>(
    smp: SharedMempool<V>,
    transaction: SignedTransaction,
    callback: oneshot::Sender<Result<SubmissionStatus>>,
) where
    V: TransactionValidation,
{
    let mut statuses =
        process_incoming_transactions(&smp, vec![transaction], TimelineState::NotReady).await;
    log_txn_process_results(statuses.clone(), None);
    let status;
    if statuses.is_empty() {
        error!("[shared mempool] missing status for client transaction submission");
        return;
    } else {
        status = statuses.remove(0);
    }
    if let Err(e) = callback
        .send(Ok(status))
        .map_err(|_| format_err!("[shared mempool] timeout on callback send to AC endpoint"))
    {
        error!("[shared mempool] failed to send back transaction submission result to AC endpoint with error: {:?}", e);
    }
}
pub ( crate ) async fn process_client_transaction_submission < V > ( smp : SharedMempool < V > , transaction : SignedTransaction , callback : oneshot :: Sender < Result < SubmissionStatus > > , ) where V : TransactionValidation , { let mut statuses = process_incoming_transactions ( & smp , vec ! [ transaction ] , TimelineState :: NotReady ) . await ; log_txn_process_results ( statuses . clone ( ) , None ) ; let status ; if statuses . is_empty ( ) { error ! ( " " ) ; return ; } else { status = statuses . remove ( 0 ) ; } if let Err ( e ) = callback . send ( Ok ( status ) ) . map_err ( | _ | format_err ! ( " " ) ) { error ! ( " " e ) ; } }
processes transactions directly submitted by client
processes transactions directly submitted by client
smp
SharedMempool<V>
transaction
SignedTransaction
callback
oneshot::Sender<Result<SubmissionStatus>>
smp
SharedMempool<V>
transaction
SignedTransaction
callback
oneshot::Sender<Result<SubmissionStatus>>