Opcode and precompile names the metering inspector can parse. Schedule `STATE_*` post-state effects are not EVM opcodes; unknown names are skipped so a loaded schedule cannot fail node startup.
(
cli_names: impl IntoIterator<Item = String>,
schedule_names: impl IntoIterator<Item = impl AsRef<str>>,
)
| 978 | /// Schedule `STATE_*` post-state effects are not EVM opcodes; unknown names are |
| 979 | /// skipped so a loaded schedule cannot fail node startup. |
| 980 | fn inspector_opcode_names( |
| 981 | cli_names: impl IntoIterator<Item = String>, |
| 982 | schedule_names: impl IntoIterator<Item = impl AsRef<str>>, |
| 983 | ) -> Vec<String> { |
| 984 | let mut names: Vec<String> = cli_names.into_iter().collect(); |
| 985 | for name in schedule_names { |
| 986 | let name = name.as_ref(); |
| 987 | if !is_inspector_opcode_name(name) { |
| 988 | continue; |
| 989 | } |
| 990 | if !names.iter().any(|existing| existing.eq_ignore_ascii_case(name)) { |
| 991 | names.push(name.to_string()); |
| 992 | } |
| 993 | } |
| 994 | names |
| 995 | } |
| 996 | |
| 997 | fn is_inspector_opcode_name(name: &str) -> bool { |
| 998 | !name.to_ascii_uppercase().starts_with("STATE_") |