/// Update data fields related to signing requests in the ECDSA payload:
///
/// - Check if new signatures have been produced, and add them to
/// signature agreements.
/// - Check if there are new signing requests, and start to work on them.
///
/// Return the number of new signing requests that are worked on (or
/// equivalently, the number of quadruples that are consumed).
// Return new signing requests initiated from canisters.
Update data fields related to signing requests in the ECDSA payload:
Check if new signatures have been produced, and add them to
signature agreements.
Check if there are new signing requests, and start to work on them.

Return the number of new signing requests that are worked on (or
equivalently, the number of quadruples that are consumed).
Return new signing requests initiated from canisters.
Update data fields related to signing requests in the ECDSA payload : Check if new signatures have been produced and add them to signature agreements . Check if there are new signing requests and start to work on them . Return the number of new signing requests that are worked on ( or equivalently the number of quadruples that are consumed ) . Return new signing requests initiated from canisters .
fn update_signing_requests(
    state_manager: &dyn StateManager<State = ReplicatedState>,
    context: &ValidationContext,
    payload: &mut ecdsa::EcdsaDataPayload,
    current_ecdsa_transcript: &Option<ecdsa::UnmaskedTranscript>,
    _log: ReplicaLogger,
) -> Result<usize, EcdsaPayloadError> {
    // Get the set of new signing requests that we have not signed, and are
    // not already working on.
    let existing_requests: BTreeSet<&ecdsa::RequestId> = payload
        .signature_agreements
        .keys()
        .chain(payload.ongoing_signatures.keys())
        .collect::<BTreeSet<_>>();
    let new_requests = get_new_signing_requests(
        state_manager,
        &existing_requests,
        &mut payload.available_quadruples,
        current_ecdsa_transcript.as_ref(),
        context.certified_height,
    )?;
    let mut count = 0;
    for (request_id, sign_inputs) in new_requests {
        payload.ongoing_signatures.insert(request_id, sign_inputs);
        count += 1;
    }
    Ok(count)
}
fn update_signing_requests ( state_manager : & dyn StateManager < State = ReplicatedState > , context : & ValidationContext , payload : & mut ecdsa :: EcdsaDataPayload , current_ecdsa_transcript : & Option < ecdsa :: UnmaskedTranscript > , _log : ReplicaLogger , ) -> Result < usize , EcdsaPayloadError > { // Get the set of new signing requests that we have not signed, and are // not already working on. let existing_requests : BTreeSet < & ecdsa :: RequestId > = payload . signature_agreements . keys ( ) . chain ( payload . ongoing_signatures . keys ( ) ) . collect :: < BTreeSet < _ > > ( ) ; let new_requests = get_new_signing_requests ( state_manager , & existing_requests , & mut payload . available_quadruples , current_ecdsa_transcript . as_ref ( ) , context . certified_height , ) ? ; let mut count = 0 ; for ( request_id , sign_inputs ) in new_requests { payload . ongoing_signatures . insert ( request_id , sign_inputs ) ; count += 1 ; } Ok ( count ) }
Update data fields related to signing requests in the ECDSA payload:
 Check if new signatures have been produced, and add them to
signature agreements.
Update data fields related to signing requests in the ECDSA payload : Check if new signatures have been produced and add them to signature agreements .
state_manager
&dyn StateManager<State = ReplicatedState>
context
&ValidationContext
payload
&mut ecdsa::EcdsaDataPayload
current_ecdsa_transcript
&Option<ecdsa::UnmaskedTranscript>
_log
ReplicaLogger