Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Nethermind/Nethermind.Runner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
ILogger logger = new(SimpleConsoleLogger.Instance);
ProcessExitSource? processExitSource = default;
var unhandledError = "A critical error has occurred";
Option<string>[] deprecatedOptions =
[
BasicOptions.ConfigurationDirectory,
BasicOptions.DatabasePath,
BasicOptions.LoggerConfigurationSource,
BasicOptions.PluginsDirectory
];
Comment on lines +55 to +61
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deprecatedOptions array should be marked as readonly to prevent accidental modification and to make it clear that this is an immutable collection. This is consistent with similar patterns throughout the codebase where static readonly or readonly is used for arrays that should not be modified. Additionally, the CheckForDeprecatedOptions method is called from ConfigureAsync (line 126) which is async and could potentially be called multiple times if the program is restarted, so readonly would ensure thread safety.

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +61
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deprecatedOptions array has been added to file scope, but the old local definition inside the CheckForDeprecatedOptions method at lines 287-293 has not been removed. This means the optimization won't work as intended - the method will still use the local variable instead of the file-scoped one. The local definition at lines 287-293 should be removed to complete this refactoring.

Copilot uses AI. Check for mistakes.

AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
Expand Down
Loading