fn dealings_by_index_from_dealings(
    dealings: &BTreeMap<NodeId, IDkgMultiSignedDealing>,
    dealers: &IDkgDealers,
    op_type: &IDkgTranscriptOperation,
) -> Result<BTreeMap<NodeIndex, IDkgMultiSignedDealing>, IDkgCreateTranscriptError> {
    dealings
        .iter()
        .map(|(id, d)| {
            let index = id_to_index(*id, dealers, op_type)?;
            Ok((index, d.clone()))
        })
        .collect()
}
/// Re-key the map to use indices rather than ids
///
/// The indices are such that they allow the previous transcript(s) (if any)
/// to be properly recombined (i.e. the indices are for the previous sharing,
/// if this is a resharing or multiplication).
Re-key the map to use indices rather than ids
The indices are such that they allow the previous transcript(s) (if any)
to be properly recombined .
Re - key the map to use indices rather than ids The indices are such that they allow the previous transcript ( s ) ( if any ) to be properly recombined .
fn dealings_by_index_from_dealings(
    dealings: &BTreeMap<NodeId, IDkgMultiSignedDealing>,
    dealers: &IDkgDealers,
    op_type: &IDkgTranscriptOperation,
) -> Result<BTreeMap<NodeIndex, IDkgMultiSignedDealing>, IDkgCreateTranscriptError> {
    dealings
        .iter()
        .map(|(id, d)| {
            let index = id_to_index(*id, dealers, op_type)?;
            Ok((index, d.clone()))
        })
        .collect()
}
fn dealings_by_index_from_dealings ( dealings : & BTreeMap < NodeId , IDkgMultiSignedDealing > , dealers : & IDkgDealers , op_type : & IDkgTranscriptOperation , ) -> Result < BTreeMap < NodeIndex , IDkgMultiSignedDealing > , IDkgCreateTranscriptError > { dealings . iter ( ) . map ( | ( id , d ) | { let index = id_to_index ( * id , dealers , op_type ) ? ; Ok ( ( index , d . clone ( ) ) ) } ) . collect ( ) }
Re-key the map to use indices rather than ids
The indices are such that they allow the previous transcript(s) (if any)
to be properly recombined (i.e.
Re - key the map to use indices rather than ids The indices are such that they allow the previous transcript ( s ) ( if any ) to be properly recombined ( i . e .
dealings
&BTreeMap<NodeId, IDkgMultiSignedDealing>
dealers
&IDkgDealers
op_type
&IDkgTranscriptOperation
dealings
&BTreeMap<NodeId, IDkgMultiSignedDealing>
dealers
&IDkgDealers
op_type
&IDkgTranscriptOperation