/// Submits a proposal for updating a subnet replica software version.
///
/// # Arguments
///
/// * `governance`  - Governance canister
/// * `sender`      - Sender of the proposal
/// * `neuron_id`   - ID of the proposing neuron. This neuron will automatically
///   vote in favor of the proposal.
/// * `version`     - Replica software version
/// * `subnet_id`   - ID of the subnet to be updated
///
/// Note: The existing replica *must* check that the new replica image
/// has the expected SHA256. If there is a mismatch, then this proposal
/// must eventually fail.
///
/// Eventually returns the identifier of the newly submitted proposal.
Submits a proposal for updating a subnet replica software version.
Submits a proposal for updating a subnet replica software version .
pub async fn submit_update_subnet_replica_version_proposal(
    governance: &Canister<'_>,
    sender: Sender,
    neuron_id: NeuronId,
    version: ReplicaVersion,
    subnet_id: SubnetId,
) -> ProposalId {
    submit_external_update_proposal_allowing_error(
        governance,
        sender,
        neuron_id,
        NnsFunction::UpdateSubnetReplicaVersion,
        UpdateSubnetReplicaVersionPayload {
            subnet_id: subnet_id.get(),
            replica_version_id: String::from(version.clone()),
        },
        format!(
            "Update {} subnet's replica version to: {}",
            subnet_id,
            String::from(version)
        ),
        "".to_string(),
    )
    .await
    .expect("submit_update_subnet_replica_version_proposal failed")
}
pub async fn submit_update_subnet_replica_version_proposal ( governance : & Canister < ' _ > , sender : Sender , neuron_id : NeuronId , version : ReplicaVersion , subnet_id : SubnetId , ) -> ProposalId { submit_external_update_proposal_allowing_error ( governance , sender , neuron_id , NnsFunction :: UpdateSubnetReplicaVersion , UpdateSubnetReplicaVersionPayload { subnet_id : subnet_id . get ( ) , replica_version_id : String :: from ( version . clone ( ) ) , } , format ! ( " " subnet_id String from ( version ) ) , " " . to_string ( ) , ) . await . expect ( " " ) }
Submits a proposal for updating a subnet replica software version.
Submits a proposal for updating a subnet replica software version .
governance
&Canister<'_>
sender
Sender
neuron_id
NeuronId
version
ReplicaVersion
subnet_id
SubnetId