fn propose_and_vote(&self, gov: &mut Governance, summary: String) -> ProposalId {
        // Submit proposal
        let pid = gov
            .make_proposal(
                &NeuronId { id: self.proposer },
                &principal(self.proposer),
                &Proposal {
                    summary,
                    action: Some(proposal::Action::Motion(Motion {
                        motion_text: "me like proposals".to_string(),
                    })),
                    ..Default::default()
                },
            )
            .unwrap();
        // Vote
        for (voter, vote) in &self.votes {
            register_vote_assert_success(
                gov,
                principal(*voter),
                NeuronId { id: *voter },
                pid,
                *vote,
            );
        }
        pid
    }
/// Creates a proposal from the specified proposer, and register the
/// specified votes.
///
/// This function assumes that:
/// - neuron of id `i` has for controller `principal(i)`
Creates a proposal from the specified proposer, and register the
specified votes.

This function assumes that:
neuron of id `i` has for controller `principal(i)`
Creates a proposal from the specified proposer and register the specified votes . This function assumes that : neuron of id ` i ` has for controller ` principal ( i ) `
fn propose_and_vote(&self, gov: &mut Governance, summary: String) -> ProposalId {
        // Submit proposal
        let pid = gov
            .make_proposal(
                &NeuronId { id: self.proposer },
                &principal(self.proposer),
                &Proposal {
                    summary,
                    action: Some(proposal::Action::Motion(Motion {
                        motion_text: "me like proposals".to_string(),
                    })),
                    ..Default::default()
                },
            )
            .unwrap();
        // Vote
        for (voter, vote) in &self.votes {
            register_vote_assert_success(
                gov,
                principal(*voter),
                NeuronId { id: *voter },
                pid,
                *vote,
            );
        }
        pid
    }
fn propose_and_vote ( & self , gov : & mut Governance , summary : String ) -> ProposalId { // Submit proposal let pid = gov . make_proposal ( & NeuronId { id : self . proposer } , & principal ( self . proposer ) , & Proposal { summary , action : Some ( proposal :: Action :: Motion ( Motion { motion_text : " " . to_string ( ) , } ) ) , .. Default :: default ( ) } , ) . unwrap ( ) ; // Vote for ( voter , vote ) in & self . votes { register_vote_assert_success ( gov , principal ( * voter ) , NeuronId { id : * voter } , pid , * vote , ) ; } pid }
Creates a proposal from the specified proposer, and register the
specified votes.
Creates a proposal from the specified proposer and register the specified votes .
&self
gov
&mut Governance
summary
String
&self
gov
&mut Governance
summary
String