/// Issues a manage_neuron command to register a vote
Issues a manage_neuron command to register a vote
Issues a manage_neuron command to register a vote
fn register_vote(
    governance: &mut Governance,
    caller: PrincipalId,
    neuron_id: NeuronId,
    pid: ProposalId,
    vote: Vote,
) -> ManageNeuronResponse {
    let manage_neuron = ManageNeuron {
        id: None,
        neuron_id_or_subaccount: Some(NeuronIdOrSubaccount::NeuronId(neuron_id)),
        command: Some(manage_neuron::Command::RegisterVote(
            manage_neuron::RegisterVote {
                proposal: Some(pid),
                vote: vote as i32,
            },
        )),
    };
    governance
        .manage_neuron(&caller, &manage_neuron)
        .now_or_never()
        .unwrap()
}
fn register_vote ( governance : & mut Governance , caller : PrincipalId , neuron_id : NeuronId , pid : ProposalId , vote : Vote , ) -> ManageNeuronResponse { let manage_neuron = ManageNeuron { id : None , neuron_id_or_subaccount : Some ( NeuronIdOrSubaccount :: NeuronId ( neuron_id ) ) , command : Some ( manage_neuron :: Command :: RegisterVote ( manage_neuron :: RegisterVote { proposal : Some ( pid ) , vote : vote as i32 , } , ) ) , } ; governance . manage_neuron ( & caller , & manage_neuron ) . now_or_never ( ) . unwrap ( ) }
Issues a manage_neuron command to register a vote
Issues a manage_neuron command to register a vote
governance
&mut Governance
caller
PrincipalId
neuron_id
NeuronId
pid
ProposalId
vote
Vote