// Submit a proposal (with nonsensical payload -- which won't matter, since
// in this test it will be always voted `No`, thus preventing it from
// execution).
Submit a proposal (with nonsensical payload -- which won't matter, since
in this test it will be always voted `No`, thus preventing it from
execution).
Submit a proposal ( with nonsensical payload -- which won ' t matter since in this test it will be always voted ` No ` thus preventing it from execution ) .
async fn submit_proposal_by_neuron(
    neuron: NeuronId,
    keypair: &ed25519_dalek::Keypair,
    runtime: &Runtime,
) -> Result<ProposalId, GovernanceError> {
    let root = Canister::new(runtime, ROOT_CANISTER_ID);
    let governance = Canister::new(runtime, GOVERNANCE_CANISTER_ID);
    let proposal_payload = ChangeNnsCanisterProposalPayload::new(
        false,
        ic_base_types::CanisterInstallMode::Upgrade,
        root.canister_id(),
    );
    submit_external_update_proposal_allowing_error(
        &governance,
        Sender::from_keypair(keypair),
        neuron,
        NnsCanisterUpgrade,
        proposal_payload,
        "<proposal created by submit_proposal_by_neuron>".to_string(),
        "".to_string(),
    )
    .await
}
async fn submit_proposal_by_neuron ( neuron : NeuronId , keypair : & ed25519_dalek :: Keypair , runtime : & Runtime , ) -> Result < ProposalId , GovernanceError > { let root = Canister :: new ( runtime , ROOT_CANISTER_ID ) ; let governance = Canister :: new ( runtime , GOVERNANCE_CANISTER_ID ) ; let proposal_payload = ChangeNnsCanisterProposalPayload :: new ( false , ic_base_types :: CanisterInstallMode :: Upgrade , root . canister_id ( ) , ) ; submit_external_update_proposal_allowing_error ( & governance , Sender :: from_keypair ( keypair ) , neuron , NnsCanisterUpgrade , proposal_payload , " " . to_string ( ) , " " . to_string ( ) , ) . await }
Submit a proposal (with nonsensical payload -- which won't matter, since
in this test it will be always voted `No`, thus preventing it from
execution).
Submit a proposal ( with nonsensical payload -- which won ' t matter since in this test it will be always voted ` No ` thus preventing it from execution ) .
neuron
NeuronId
keypair
&ed25519_dalek::Keypair
runtime
&Runtime