1- //! A Catalyst generalised vote transaction builder
1+ //! A Catalyst generalized vote transaction builder
22
33use anyhow:: ensure;
44
@@ -7,31 +7,31 @@ use crate::{encoded_cbor::EncodedCbor, uuid::Uuid, Cbor};
77
88/// `GeneralizedTx` builder struct
99#[ allow( clippy:: module_name_repetitions) ]
10- pub struct GeneralizedTxBuilder < ChoiceT , ProofT , ProopIdT , VoterDataT >
10+ pub struct GeneralizedTxBuilder < ChoiceT , ProofT , PropIdT , VoterDataT >
1111where
1212 ChoiceT : for < ' a > Cbor < ' a > ,
1313 ProofT : for < ' a > Cbor < ' a > ,
14- ProopIdT : for < ' a > Cbor < ' a > ,
14+ PropIdT : for < ' a > Cbor < ' a > ,
1515 VoterDataT : for < ' a > Cbor < ' a > ,
1616{
1717 /// The `vote_type` field
1818 vote_type : Uuid ,
1919 /// The `event` field
2020 event : EventMap ,
2121 /// The `votes` field
22- votes : Vec < Vote < ChoiceT , ProofT , ProopIdT > > ,
22+ votes : Vec < Vote < ChoiceT , ProofT , PropIdT > > ,
2323 /// The `voter_data` field
2424 voter_data : VoterData < VoterDataT > ,
2525 /// The `signature` builder field
2626 sign_builder : coset:: CoseSignBuilder ,
2727}
2828
29- impl < ChoiceT , ProofT , ProopIdT , VoterDataT >
30- GeneralizedTxBuilder < ChoiceT , ProofT , ProopIdT , VoterDataT >
29+ impl < ChoiceT , ProofT , PropIdT , VoterDataT >
30+ GeneralizedTxBuilder < ChoiceT , ProofT , PropIdT , VoterDataT >
3131where
3232 ChoiceT : for < ' a > Cbor < ' a > + Clone ,
3333 ProofT : for < ' a > Cbor < ' a > + Clone ,
34- ProopIdT : for < ' a > Cbor < ' a > + Clone ,
34+ PropIdT : for < ' a > Cbor < ' a > + Clone ,
3535 VoterDataT : for < ' a > Cbor < ' a > + Clone ,
3636{
3737 /// Creates a new `GeneralizedTxBuilder` struct
6464 /// # Errors
6565 /// - `choices` array must has at least one entry-
6666 pub fn with_vote (
67- mut self , choices : Vec < ChoiceT > , proof : ProofT , prop_id : ProopIdT ,
67+ mut self , choices : Vec < ChoiceT > , proof : ProofT , prop_id : PropIdT ,
6868 ) -> anyhow:: Result < Self > {
6969 ensure ! (
7070 !choices. is_empty( ) ,
8282 ///
8383 /// # Errors
8484 /// - `votes` array must has at least one entry
85- pub fn build ( self ) -> anyhow:: Result < GeneralizedTx < ChoiceT , ProofT , ProopIdT , VoterDataT > > {
85+ pub fn build ( self ) -> anyhow:: Result < GeneralizedTx < ChoiceT , ProofT , PropIdT , VoterDataT > > {
8686 ensure ! (
8787 !self . votes. is_empty( ) ,
8888 "`votes` array must has at least one entry"
0 commit comments