fn log_received_vertex(&self, vertex: &Vertex<C>) {
        match vertex {
            Vertex::Unit(swu) => {
                let creator = if let Some(creator) = vertex
                    .creator()
                    .and_then(|vid| self.highway.validators().id(vid))
                {
                    creator
                } else {
                    error!(?vertex, "invalid creator");
                    return;
                };

                let wire_unit = swu.wire_unit();
                let hash = swu.hash();

                if vertex.is_proposal() {
                    info!(
                        ?hash,
                        ?creator,
                        creator_index = wire_unit.creator.0,
                        timestamp = %wire_unit.timestamp,
                        round_exp = wire_unit.round_exp,
                        seq_number = wire_unit.seq_number,
                        "received a proposal"
                    );
                } else {
                    trace!(
                        ?hash,
                        ?creator,
                        creator_index = wire_unit.creator.0,
                        timestamp = %wire_unit.timestamp,
                        round_exp = wire_unit.round_exp,
                        seq_number = wire_unit.seq_number,
                        "received a non-proposal unit"
                    );
                };
            }
            Vertex::Evidence(evidence) => trace!(?evidence, "received an evidence"),
            Vertex::Endorsements(endorsement) => trace!(?endorsement, "received an endorsement"),
            Vertex::Ping(ping) => trace!(?ping, "received ping"),
        }
    }
// Logs the details about the received vertex.
Logs the details about the received vertex.
Logs the details about the received vertex .
fn log_received_vertex(&self, vertex: &Vertex<C>) {
        match vertex {
            Vertex::Unit(swu) => {
                let creator = if let Some(creator) = vertex
                    .creator()
                    .and_then(|vid| self.highway.validators().id(vid))
                {
                    creator
                } else {
                    error!(?vertex, "invalid creator");
                    return;
                };
                let wire_unit = swu.wire_unit();
                let hash = swu.hash();
                if vertex.is_proposal() {
                    info!(
                        ?hash,
                        ?creator,
                        creator_index = wire_unit.creator.0,
                        timestamp = %wire_unit.timestamp,
                        round_exp = wire_unit.round_exp,
                        seq_number = wire_unit.seq_number,
                        "received a proposal"
                    );
                } else {
                    trace!(
                        ?hash,
                        ?creator,
                        creator_index = wire_unit.creator.0,
                        timestamp = %wire_unit.timestamp,
                        round_exp = wire_unit.round_exp,
                        seq_number = wire_unit.seq_number,
                        "received a non-proposal unit"
                    );
                };
            }
            Vertex::Evidence(evidence) => trace!(?evidence, "received an evidence"),
            Vertex::Endorsements(endorsement) => trace!(?endorsement, "received an endorsement"),
            Vertex::Ping(ping) => trace!(?ping, "received ping"),
        }
    }
fn log_received_vertex ( & self , vertex : & Vertex < C > ) { match vertex { Vertex :: Unit ( swu ) => { let creator = if let Some ( creator ) = vertex . creator ( ) . and_then ( | vid | self . highway . validators ( ) . id ( vid ) ) { creator } else { error ! ( vertex " " ) ; return ; } ; let wire_unit = swu . wire_unit ( ) ; let hash = swu . hash ( ) ; if vertex . is_proposal ( ) { info ! ( hash creator creator_index wire_unit creator 0 timestamp wire_unit timestamp round_exp wire_unit round_exp seq_number wire_unit seq_number " " ) ; } else { trace ! ( hash creator creator_index wire_unit creator 0 timestamp wire_unit timestamp round_exp wire_unit round_exp seq_number wire_unit seq_number " " ) ; } ; } Vertex :: Evidence ( evidence ) => trace ! ( evidence " " ) , Vertex :: Endorsements ( endorsement ) => trace ! ( endorsement " " ) , Vertex :: Ping ( ping ) => trace ! ( ping " " ) , } }
Logs the details about the received vertex.
Logs the details about the received vertex .
&self
vertex
&Vertex<C>
&self
vertex
&Vertex<C>