fn check_ac_response(resp: &ProtoSubmitTransactionResponse) -> bool {
    if resp.has_ac_status() {
        let status = resp.get_ac_status().get_code();
        if status == AdmissionControlStatusCode::Accepted {
            OP_COUNTER.inc(&format!("submit_txns.{:?}", status));
            true
        } else {
            OP_COUNTER.inc(&format!("submit_txns.{:?}", status));
            error!("Request rejected by AC: {:?}", resp);
            false
        }
    } else if resp.has_vm_status() {
        OP_COUNTER.inc(&format!("submit_txns.{:?}", resp.get_vm_status()));
        error!("Request causes error on VM: {:?}", resp);
        false
    } else if resp.has_mempool_status() {
        OP_COUNTER.inc(&format!(
            "submit_txns.{:?}",
            resp.get_mempool_status().get_code()
        ));
        error!("Request causes error on mempool: {:?}", resp);
        false
    } else {
        OP_COUNTER.inc("submit_txns.Unknown");
        error!("Request rejected by AC for unknown error: {:?}", resp);
        false
    }
}
/// By checking 1) ac status, 2) vm status, and 3) mempool status, decide whether the reponse
/// from AC is accepted. If not, classify what the error type is.
By checking 1) ac status, 2) vm status, and 3) mempool status, decide whether the reponse
from AC is accepted. If not, classify what the error type is.
By checking 1 ) ac status 2 ) vm status and 3 ) mempool status decide whether the reponse from AC is accepted . If not classify what the error type is .
fn check_ac_response(resp: &ProtoSubmitTransactionResponse) -> bool {
    if resp.has_ac_status() {
        let status = resp.get_ac_status().get_code();
        if status == AdmissionControlStatusCode::Accepted {
            OP_COUNTER.inc(&format!("submit_txns.{:?}", status));
            true
        } else {
            OP_COUNTER.inc(&format!("submit_txns.{:?}", status));
            error!("Request rejected by AC: {:?}", resp);
            false
        }
    } else if resp.has_vm_status() {
        OP_COUNTER.inc(&format!("submit_txns.{:?}", resp.get_vm_status()));
        error!("Request causes error on VM: {:?}", resp);
        false
    } else if resp.has_mempool_status() {
        OP_COUNTER.inc(&format!(
            "submit_txns.{:?}",
            resp.get_mempool_status().get_code()
        ));
        error!("Request causes error on mempool: {:?}", resp);
        false
    } else {
        OP_COUNTER.inc("submit_txns.Unknown");
        error!("Request rejected by AC for unknown error: {:?}", resp);
        false
    }
}
fn check_ac_response ( resp : & ProtoSubmitTransactionResponse ) -> bool { if resp . has_ac_status ( ) { let status = resp . get_ac_status ( ) . get_code ( ) ; if status == AdmissionControlStatusCode :: Accepted { OP_COUNTER . inc ( & format ! ( " " status ) ) ; true } else { OP_COUNTER . inc ( & format ! ( " " status ) ) ; error ! ( " " resp ) ; false } } else if resp . has_vm_status ( ) { OP_COUNTER . inc ( & format ! ( " " resp get_vm_status ( ) ) ) ; error ! ( " " resp ) ; false } else if resp . has_mempool_status ( ) { OP_COUNTER . inc ( & format ! ( " " resp get_mempool_status ( ) get_code ( ) ) ) ; error ! ( " " resp ) ; false } else { OP_COUNTER . inc ( " " ) ; error ! ( " " resp ) ; false } }
By checking 1) ac status, 2) vm status, and 3) mempool status, decide whether the reponse
from AC is accepted.
By checking 1 ) ac status 2 ) vm status and 3 ) mempool status decide whether the reponse from AC is accepted .
resp
&ProtoSubmitTransactionResponse