pub(crate) fn process_broadcast_ack(
    mempool: &Mutex<CoreMempool>,
    request_id: String,
    is_validator: bool, // whether this node is a validator or not
) {
    if is_validator {
        return;
    }

    match parse_request_id(request_id) {
        Ok((start_id, end_id)) => {
            let mut mempool = mempool
                .lock()
                .expect("[shared mempool] failed to acquire mempool lock");

            for txn in mempool.timeline_range(start_id, end_id).iter() {
                mempool.remove_transaction(&txn.sender(), txn.sequence_number(), false);
            }
        }
        Err(err) => warn!("[shared mempool] ACK with invalid request_id: {:?}", err),
    }
}
/// processes ACK from peer node regarding txn submission to that node
processes ACK from peer node regarding txn submission to that node
processes ACK from peer node regarding txn submission to that node
pub(crate) fn process_broadcast_ack(
    mempool: &Mutex<CoreMempool>,
    request_id: String,
    is_validator: bool, // whether this node is a validator or not
) {
    if is_validator {
        return;
    }
    match parse_request_id(request_id) {
        Ok((start_id, end_id)) => {
            let mut mempool = mempool
                .lock()
                .expect("[shared mempool] failed to acquire mempool lock");
            for txn in mempool.timeline_range(start_id, end_id).iter() {
                mempool.remove_transaction(&txn.sender(), txn.sequence_number(), false);
            }
        }
        Err(err) => warn!("[shared mempool] ACK with invalid request_id: {:?}", err),
    }
}
pub ( crate ) fn process_broadcast_ack ( mempool : & Mutex < CoreMempool > , request_id : String , is_validator : bool , // whether this node is a validator or not ) { if is_validator { return ; } match parse_request_id ( request_id ) { Ok ( ( start_id , end_id ) ) => { let mut mempool = mempool . lock ( ) . expect ( " " ) ; for txn in mempool . timeline_range ( start_id , end_id ) . iter ( ) { mempool . remove_transaction ( & txn . sender ( ) , txn . sequence_number ( ) , false ) ; } } Err ( err ) => warn ! ( " " err ) , } }
processes ACK from peer node regarding txn submission to that node
processes ACK from peer node regarding txn submission to that node
mempool
&Mutex<CoreMempool>
request_id
String
is_validator
bool
mempool
&Mutex<CoreMempool>
request_id
String
is_validator
bool