fn partition_requests(
        req_vers: Vec<(Request, SocketAddr, u8)>,
    ) -> (Vec<Event>, Vec<(Request, SocketAddr)>) {
        let mut events = vec![];
        let mut reqs = vec![];
        for (msg, rsp_addr, verify) in req_vers {
            match msg {
                Request::Transaction(tr) => {
                    if verify != 0 {
                        events.push(Event::Transaction(tr));
                    }
                }
                _ => reqs.push((msg, rsp_addr)),
            }
        }
        (events, reqs)
    }
/// Split Request list into verified transactions and the rest
Split Request list into verified transactions and the rest
Split Request list into verified transactions and the rest
fn partition_requests(
        req_vers: Vec<(Request, SocketAddr, u8)>,
    ) -> (Vec<Event>, Vec<(Request, SocketAddr)>) {
        let mut events = vec![];
        let mut reqs = vec![];
        for (msg, rsp_addr, verify) in req_vers {
            match msg {
                Request::Transaction(tr) => {
                    if verify != 0 {
                        events.push(Event::Transaction(tr));
                    }
                }
                _ => reqs.push((msg, rsp_addr)),
            }
        }
        (events, reqs)
    }
fn partition_requests ( req_vers : Vec < ( Request , SocketAddr , u8 ) > , ) -> ( Vec < Event > , Vec < ( Request , SocketAddr ) > ) { let mut events = vec ! [ ] ; let mut reqs = vec ! [ ] ; for ( msg , rsp_addr , verify ) in req_vers { match msg { Request :: Transaction ( tr ) => { if verify != 0 { events . push ( Event :: Transaction ( tr ) ) ; } } _ => reqs . push ( ( msg , rsp_addr ) ) , } } ( events , reqs ) }
Split Request list into verified transactions and the rest
Split Request list into verified transactions and the rest
req_vers
Vec<(Request, SocketAddr, u8)>
req_vers
Vec<(Request, SocketAddr, u8)>