@@ -741,7 +741,7 @@ mod tests {
741741 }
742742
743743 #[ test]
744- fn fee_recipient_check_fails_when_missing ( ) {
744+ fn fee_recipient_check_enabled_validator_cases ( ) {
745745 let def = ValidatorDefinition {
746746 enabled : true ,
747747 voting_public_key : PublicKey :: from_str (
@@ -760,36 +760,15 @@ mod tests {
760760 voting_keystore_password : None ,
761761 }
762762 } ;
763+
763764 // Should return Some(pubkey) when no fee recipient is set
764765 let check_result = def. check_fee_recipient ( None ) ;
765766 assert ! ( check_result. is_some( ) ) ;
766- }
767-
768- #[ test]
769- fn fee_recipient_check_passes_with_global_flag ( ) {
770- let def = ValidatorDefinition {
771- enabled : true ,
772- voting_public_key : PublicKey :: from_str (
773- "0xaf3c7ddab7e293834710fca2d39d068f884455ede270e0d0293dc818e4f2f0f975355067e8437955cb29aec674e5c9e7"
774- ) . unwrap ( ) ,
775- description : String :: new ( ) ,
776- graffiti : None ,
777- suggested_fee_recipient : None ,
778- gas_limit : None ,
779- builder_proposals : None ,
780- builder_boost_factor : None ,
781- prefer_builder_proposals : None ,
782- signing_definition : SigningDefinition :: LocalKeystore {
783- voting_keystore_path : PathBuf :: new ( ) ,
784- voting_keystore_password_path : None ,
785- voting_keystore_password : None ,
786- } ,
787- } ;
788767
789768 // Should return None since global fee recipient is set
790- let global_fee =
769+ let global_fee_recipient =
791770 Some ( Address :: from_str ( "0xa2e334e71511686bcfe38bb3ee1ad8f6babcc03d" ) . unwrap ( ) ) ;
792- let check_result = def. check_fee_recipient ( global_fee ) ;
771+ let check_result = def. check_fee_recipient ( global_fee_recipient ) ;
793772 assert ! ( check_result. is_none( ) ) ;
794773 }
795774
@@ -828,7 +807,7 @@ mod tests {
828807 ) . unwrap ( ) ,
829808 description : String :: new ( ) ,
830809 graffiti : None ,
831- suggested_fee_recipient : None , // No fee recipient
810+ suggested_fee_recipient : None ,
832811 gas_limit : None ,
833812 builder_proposals : None ,
834813 builder_boost_factor : None ,
@@ -987,8 +966,8 @@ mod tests {
987966 let defs = ValidatorDefinitions :: from ( vec ! [ def1, def2] ) ;
988967
989968 // Should pass - global fee recipient is set
990- let global_fee =
969+ let global_fee_recipient =
991970 Some ( Address :: from_str ( "0xa2e334e71511686bcfe38bb3ee1ad8f6babcc03d" ) . unwrap ( ) ) ;
992- assert ! ( defs. check_all_fee_recipients( global_fee ) . is_ok( ) ) ;
971+ assert ! ( defs. check_all_fee_recipients( global_fee_recipient ) . is_ok( ) ) ;
993972 }
994973}
0 commit comments