fn create_vote()

in librabft-v2/src/record_store.rs [676:700]


    fn create_vote(
        &mut self,
        context: &mut Context,
        certified_block_hash: BlockHash<Context::HashValue>,
    ) -> bool {
        let committed_state = self.vote_committed_state(certified_block_hash);
        match self.compute_state(certified_block_hash, context) {
            Some(state) => {
                let vote = Record::Vote(SignedValue::make(
                    context,
                    Vote_ {
                        epoch_id: self.epoch_id,
                        round: self.block(certified_block_hash).unwrap().value.round,
                        certified_block_hash,
                        state,
                        author: context.author(),
                        committed_state,
                    },
                ));
                self.insert_network_record(vote, context);
                true
            }
            None => false,
        }
    }