Code factor & small issues.
ADD
WalletWasabi/Tor/Control/Messages/CircuitStatus/CircPath.cs
+namespace WalletWasabi.Tor.Control.Messages.CircuitStatus
+{
+ /// <summary>
+ /// </summary>
+ /// <remarks>
+ /// <see cref="FingerPrint"/> is a 40*HEXDIG string.
+ /// <para><see cref="Nickname"/> matches <c>^[a-zA-Z0-9]{1, 19}$</c>.</para>
+ /// </remarks>
+ public record CircPath(string FingerPrint, string? Nickname)
+ {
+ }
+}

ADD
WalletWasabi/Tor/Control/Messages/CircuitStatus/CircuitInfo.cs
+using System.Collections.Generic;
+
+namespace WalletWasabi.Tor.Control.Messages.CircuitStatus
+{
+ /// <remarks>
+ /// Note that the <see cref="CircuitID"/> and <see cref="CircStatus"/> are then only mandatory
+ /// fields in <c>GETINFO circuit-status</c> reply.
+ /// </remarks>
+ public class CircuitInfo
+ {
+ public CircuitInfo(string circuitID, CircStatus circStatus)
+ {
+ CircuitID = circuitID;
+ CircStatus = circStatus;
+ }
+
+ /// <summary>Unique circuit identifier</summary>
+ /// <remarks>
+ /// Currently, Tor only uses digits, but this may change.
+ /// <para>String matches <c>^[a-zA-Z0-9]{1,16}$</c>.</para>
+ /// </remarks>
+ /// <seealso href="https://gitweb.torproject.org/torspec.git/tree/control-spec.txt">2.4. General-use tokens</seealso>
+ public string CircuitID { get; }
+ public CircStatus CircStatus { get; }
+ public List<CircPath> CircPaths { get; init; } = new();
+ public BuildFlag? BuildFlag { get; init; }
+ public Purpose? Purpose { get; init; }
+ public HsState? HsState { get; init; }
+ public string? RendQuery { get; init; }
+ public string? TimeCreated { get; init; }
+ public Reason? Reason { get; init; }
+ public Reason? RemoteReason { get; init; }
+ public string? UserName { get; init; }
+ public string? UserPassword { get; init; }
+ }
+}

MODIFY
WalletWasabi/Tor/Control/Messages/CircuitStatus/HsState.cs
WalletWasabi/Tor/Control/Messages/CircuitStatus/HsState.cs
@@ -24,9 +24,9 @@ namespace WalletWasabi.Tor.Control.Messages.CircuitStatus
// Service-side introduction-point circuit states
- /// <summary>connecting to intro point</summary>
+ /// <summary>Connecting to intro point</summary>
HSSI_CONNECTING,
- /// <summary>established intro point</summary>
+ /// <summary>Established intro point</summary>
HSSI_ESTABLISHED,
// Service-side rendezvous-point circuit states

MODIFY
WalletWasabi/Tor/Control/Messages/GetInfoCircuitStatusReply.cs
WalletWasabi/Tor/Control/Messages/GetInfoCircuitStatusReply.cs
@@ -169,46 +169,4 @@ namespace WalletWasabi.Tor.Control.Messages
return result;
}
}
-
- /// <remarks>
- /// Note that the <see cref="CircuitID"/> and <see cref="CircStatus"/> are then only mandatory
- /// fields in <c>GETINFO circuit-status</c> reply.
- /// </remarks>
- public class CircuitInfo
- {
- public CircuitInfo(string circuitID, CircStatus circStatus)
- {
- CircuitID = circuitID;
- CircStatus = circStatus;
- }
-
- /// <summary>Unique circuit identifier</summary>
- /// <remarks>
- /// Currently, Tor only uses digits, but this may change.
- /// <para>String matches <c>^[a-zA-Z0-9]{1,16}$</c>.</para>
- /// </remarks>
- /// <seealso href="https://gitweb.torproject.org/torspec.git/tree/control-spec.txt">2.4. General-use tokens</seealso>
- public string CircuitID { get; }
- public CircStatus CircStatus { get; }
- public List<CircPath> CircPaths { get; init; } = new();
- public BuildFlag? BuildFlag { get; init; }
- public Purpose? Purpose { get; init; }
- public HsState? HsState { get; init; }
- public string? RendQuery { get; init; }
- public string? TimeCreated { get; init; }
- public Reason? Reason { get; init; }
- public Reason? RemoteReason { get; init; }
- public string? UserName { get; init; }
- public string? UserPassword { get; init; }
- }
-
- /// <summary>
- /// </summary>
- /// <remarks>
- /// <see cref="FingerPrint"/> is a 40*HEXDIG string.
- /// <para><see cref="Nickname"/> matches <c>^[a-zA-Z0-9]{1, 19}$</c>.</para>
- /// </remarks>
- public record CircPath(string FingerPrint, string? Nickname)
- {
- }
}

MODIFY
WalletWasabi/Tor/Control/Messages/TorControlReply.cs
WalletWasabi/Tor/Control/Messages/TorControlReply.cs
@@ -24,7 +24,7 @@ namespace WalletWasabi.Tor.Control.Messages
/// <seealso href="https://gitweb.torproject.org/torspec.git/tree/control-spec.txt">Section 2.3</seealso>
public class TorControlReply
{
- private readonly static ReadOnlyCollection<string> NoLines = new List<string>().AsReadOnly();
+ private static readonly ReadOnlyCollection<string> NoLines = new List<string>().AsReadOnly();
public TorControlReply(StatusCode statusCode)
{

Code factor & small issues.