pub(crate) fn wire_unit(
        &self,
        hash: &C::Hash,
        instance_id: C::InstanceId,
    ) -> Option<SignedWireUnit<C>> {
        let unit = self.maybe_unit(hash)?.clone();
        let maybe_block = self.maybe_block(hash);
        let value = maybe_block.map(|block| block.value.clone());
        let endorsed = unit.claims_endorsed().cloned().collect();
        let wunit = WireUnit {
            panorama: unit.panorama.clone(),
            creator: unit.creator,
            instance_id,
            value,
            seq_number: unit.seq_number,
            timestamp: unit.timestamp,
            round_exp: unit.round_exp,
            endorsed,
        };
        Some(SignedWireUnit {
            hashed_wire_unit: HashedWireUnit::new_with_hash(wunit, *hash),
            signature: unit.signature,
        })
    }
/// Returns the `SignedWireUnit` with the given hash, if it is present in the state.
Returns the `SignedWireUnit` with the given hash, if it is present in the state.
Returns the ` SignedWireUnit ` with the given hash if it is present in the state .
pub(crate) fn wire_unit(
        &self,
        hash: &C::Hash,
        instance_id: C::InstanceId,
    ) -> Option<SignedWireUnit<C>> {
        let unit = self.maybe_unit(hash)?.clone();
        let maybe_block = self.maybe_block(hash);
        let value = maybe_block.map(|block| block.value.clone());
        let endorsed = unit.claims_endorsed().cloned().collect();
        let wunit = WireUnit {
            panorama: unit.panorama.clone(),
            creator: unit.creator,
            instance_id,
            value,
            seq_number: unit.seq_number,
            timestamp: unit.timestamp,
            round_exp: unit.round_exp,
            endorsed,
        };
        Some(SignedWireUnit {
            hashed_wire_unit: HashedWireUnit::new_with_hash(wunit, *hash),
            signature: unit.signature,
        })
    }
pub ( crate ) fn wire_unit ( & self , hash : & C :: Hash , instance_id : C :: InstanceId , ) -> Option < SignedWireUnit < C > > { let unit = self . maybe_unit ( hash ) ? . clone ( ) ; let maybe_block = self . maybe_block ( hash ) ; let value = maybe_block . map ( | block | block . value . clone ( ) ) ; let endorsed = unit . claims_endorsed ( ) . cloned ( ) . collect ( ) ; let wunit = WireUnit { panorama : unit . panorama . clone ( ) , creator : unit . creator , instance_id , value , seq_number : unit . seq_number , timestamp : unit . timestamp , round_exp : unit . round_exp , endorsed , } ; Some ( SignedWireUnit { hashed_wire_unit : HashedWireUnit :: new_with_hash ( wunit , * hash ) , signature : unit . signature , } ) }
Returns the `SignedWireUnit` with the given hash, if it is present in the state.
Returns the ` SignedWireUnit ` with the given hash if it is present in the state .
&self
hash
&C::Hash
instance_id
C::InstanceId
&self
hash
&C::Hash
instance_id
C::InstanceId