@@ -57,8 +57,8 @@ pub struct Cip509Validation {
5757 pub is_valid_txn_inputs_hash : bool ,
5858 /// Boolean value for the validity of the auxiliary data.
5959 pub is_valid_aux : bool ,
60- /// Boolean value for the validity of the public key.
61- pub is_valid_public_key : bool ,
60+ /// Boolean value for the validity of the stake public key.
61+ pub is_valid_stake_public_key : bool ,
6262 /// Boolean value for the validity of the payment key.
6363 pub is_valid_payment_key : bool ,
6464 /// Boolean value for the validity of the signing key.
@@ -172,32 +172,31 @@ impl Cip509 {
172172 pub fn validate (
173173 & self , txn : & MultiEraTx , validation_report : & mut Vec < String > ,
174174 ) -> Cip509Validation {
175- let tx_input_validate =
175+ let is_valid_txn_inputs_hash =
176176 validate_txn_inputs_hash ( self , txn, validation_report) . unwrap_or ( false ) ;
177- let ( aux_validate , precomputed_aux) =
177+ let ( is_valid_aux , precomputed_aux) =
178178 validate_aux ( txn, validation_report) . unwrap_or_default ( ) ;
179- let mut stake_key_validate = true ;
180- let mut payment_key_validate = true ;
181- let mut signing_key_validate = true ;
182- // Validate the role 0
179+ let mut is_valid_stake_public_key = true ;
180+ let mut is_valid_payment_key = true ;
181+ let mut is_valid_signing_key = true ;
183182 if let Some ( role_set) = & self . x509_chunks . 0 . role_set {
184183 // Validate only role 0
185184 for role in role_set {
186185 if role. role_number == 0 {
187- stake_key_validate =
186+ is_valid_stake_public_key =
188187 validate_stake_public_key ( self , txn, validation_report) . unwrap_or ( false ) ;
189- payment_key_validate =
188+ is_valid_payment_key =
190189 validate_payment_key ( txn, role, validation_report) . unwrap_or ( false ) ;
191- signing_key_validate = validate_role_singing_key ( role, validation_report) ;
190+ is_valid_signing_key = validate_role_singing_key ( role, validation_report) ;
192191 }
193192 }
194193 }
195194 Cip509Validation {
196- is_valid_txn_inputs_hash : tx_input_validate ,
197- is_valid_aux : aux_validate ,
198- is_valid_public_key : stake_key_validate ,
199- is_valid_payment_key : payment_key_validate ,
200- is_valid_signing_key : signing_key_validate ,
195+ is_valid_txn_inputs_hash,
196+ is_valid_aux,
197+ is_valid_stake_public_key ,
198+ is_valid_payment_key,
199+ is_valid_signing_key,
201200 additional_data : AdditionalData { precomputed_aux } ,
202201 }
203202 }
0 commit comments