diff --git a/src/Nethermind/Nethermind.Shutter/Config/IShutterConfig.cs b/src/Nethermind/Nethermind.Shutter/Config/IShutterConfig.cs index 79278f3a705..546be8631b1 100644 --- a/src/Nethermind/Nethermind.Shutter/Config/IShutterConfig.cs +++ b/src/Nethermind/Nethermind.Shutter/Config/IShutterConfig.cs @@ -75,9 +75,9 @@ public interface IShutterConfig : IConfig DefaultValue = "true", HiddenFromDocs = true)] bool Validator { get; set; } - [ConfigItem(Description = "How many minutes to wait for transactions before sending a disconnection warning.", - DefaultValue = "20", HiddenFromDocs = true)] - ushort DisconnectionLogTimeout { get; set; } + [ConfigItem(Description = "How many milliseconds to wait for transactions before sending a disconnection warning.", + DefaultValue = "1200000", HiddenFromDocs = true)] + uint DisconnectionLogTimeout { get; set; } public void Validate(out Multiaddress[] bootnodeP2PAddresses) { @@ -111,9 +111,9 @@ public void Validate(out Multiaddress[] bootnodeP2PAddresses) throw new ArgumentException("Must set Shutter keyper set manager contract address to valid address."); } - if (DisconnectionLogTimeout == 0) + if (DisconnectionLogTimeout < 60000) { - throw new ArgumentException("Must set Shutter disconnection log timeout greater than 0."); + throw new ArgumentException("Must set Shutter disconnection log timeout to at least a minute."); } if (P2PAgentVersion is null) diff --git a/src/Nethermind/Nethermind.Shutter/Config/ShutterConfig.cs b/src/Nethermind/Nethermind.Shutter/Config/ShutterConfig.cs index 8e638748d67..1a1f270a579 100644 --- a/src/Nethermind/Nethermind.Shutter/Config/ShutterConfig.cs +++ b/src/Nethermind/Nethermind.Shutter/Config/ShutterConfig.cs @@ -21,6 +21,6 @@ public class ShutterConfig : IShutterConfig public ulong InstanceID { get; set; } = 0; public int EncryptedGasLimit { get; set; } = 10000000; public ushort MaxKeyDelay { get; set; } = 1666; - public ushort DisconnectionLogTimeout { get; set; } = 20; + public uint DisconnectionLogTimeout { get; set; } = 1200000; } } diff --git a/src/Nethermind/Nethermind.Shutter/ShutterP2P.cs b/src/Nethermind/Nethermind.Shutter/ShutterP2P.cs index 07960e2e8f3..035d3239dd9 100644 --- a/src/Nethermind/Nethermind.Shutter/ShutterP2P.cs +++ b/src/Nethermind/Nethermind.Shutter/ShutterP2P.cs @@ -42,7 +42,7 @@ public ShutterP2P(IShutterConfig shutterConfig, ILogManager logManager, IFileSys { _logger = logManager.GetClassLogger(); _cfg = shutterConfig; - DisconnectionLogTimeout = TimeSpan.FromMinutes(_cfg.DisconnectionLogTimeout); + DisconnectionLogTimeout = TimeSpan.FromMilliseconds(_cfg.DisconnectionLogTimeout); _serviceProvider = new ServiceCollection() .AddLibp2p(builder => builder) .AddSingleton(new IdentifyProtocolSettings