@@ -112,8 +112,6 @@ pub enum BlockchainError {
112112 "EIP-7702 fields received but is not supported by the current hardfork.\n \n You can use it by running anvil with '--hardfork prague' or later."
113113 ) ]
114114 EIP7702TransactionUnsupportedAtHardfork ,
115- // Only suggest flags this build actually has: `--optimism` needs the optimism feature and
116- // `--network base` needs the base one.
117115 #[ cfg_attr(
118116 all( feature = "base" , feature = "optimism" ) ,
119117 error(
@@ -654,29 +652,3 @@ impl<T: Serialize> ToRpcResponseResult for Result<T> {
654652 }
655653 }
656654}
657-
658- #[ cfg( test) ]
659- mod tests {
660- use super :: BlockchainError ;
661-
662- /// The hint has to name flags this build actually exposes: `--optimism` only exists with the
663- /// optimism feature and `--network base` only with the base one.
664- ///
665- /// Only meaningful where the variant is reachable; with neither feature nothing constructs it.
666- #[ test]
667- #[ cfg( any( feature = "base" , feature = "optimism" ) ) ]
668- fn deposit_unsupported_hint_only_names_available_flags ( ) {
669- let message = BlockchainError :: DepositTransactionUnsupported . to_string ( ) ;
670-
671- assert_eq ! (
672- message. contains( "'--optimism'" ) ,
673- cfg!( feature = "optimism" ) ,
674- "optimism hint does not match this build: {message}"
675- ) ;
676- assert_eq ! (
677- message. contains( "'--network base'" ) ,
678- cfg!( feature = "base" ) ,
679- "base hint does not match this build: {message}"
680- ) ;
681- }
682- }
0 commit comments