/// Computes the expected message and signal indices for every known subnet.
Computes the expected message and signal indices for every known subnet.
Computes the expected message and signal indices for every known subnet .
fn expected_stream_indices(
        &self,
        validation_context: &ValidationContext,
        state: &ReplicatedState,
        past_payloads: &[&XNetPayload],
    ) -> Result<BTreeMap<SubnetId, ExpectedIndices>, Error> {
        let subnet_ids = self
            .registry
            .get_subnet_ids(validation_context.registry_version)
            .map_err(Error::RegistryGetSubnetsFailed)?
            .unwrap_or_else(Vec::new);
        let expected_indices = subnet_ids
            .into_iter()
            .map(|subnet_id| {
                (
                    subnet_id,
                    self.expected_indices_for_stream(subnet_id, state, past_payloads),
                )
            })
            .collect::<BTreeMap<SubnetId, ExpectedIndices>>();
        Ok(expected_indices)
    }
fn expected_stream_indices ( & self , validation_context : & ValidationContext , state : & ReplicatedState , past_payloads : & [ & XNetPayload ] , ) -> Result < BTreeMap < SubnetId , ExpectedIndices > , Error > { let subnet_ids = self . registry . get_subnet_ids ( validation_context . registry_version ) . map_err ( Error :: RegistryGetSubnetsFailed ) ? . unwrap_or_else ( Vec :: new ) ; let expected_indices = subnet_ids . into_iter ( ) . map ( | subnet_id | { ( subnet_id , self . expected_indices_for_stream ( subnet_id , state , past_payloads ) , ) } ) . collect :: < BTreeMap < SubnetId , ExpectedIndices > > ( ) ; Ok ( expected_indices ) }
Computes the expected message and signal indices for every known subnet.
Computes the expected message and signal indices for every known subnet .
&self
validation_context
&ValidationContext
state
&ReplicatedState
past_payloads
&[&XNetPayload]