From e0a734591f2f864b18f951ccc41f3eb7e36acc26 Mon Sep 17 00:00:00 2001 From: benbierens Date: Fri, 22 Sep 2023 09:17:56 +0200 Subject: [PATCH] Sets geth http and ws port to same number. --- ProjectPlugins/GethPlugin/GethContainerRecipe.cs | 4 +--- ProjectPlugins/GethPlugin/GethStarter.cs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ProjectPlugins/GethPlugin/GethContainerRecipe.cs b/ProjectPlugins/GethPlugin/GethContainerRecipe.cs index 5214e0b..503a412 100644 --- a/ProjectPlugins/GethPlugin/GethContainerRecipe.cs +++ b/ProjectPlugins/GethPlugin/GethContainerRecipe.cs @@ -9,7 +9,6 @@ namespace GethPlugin public const string HttpPortTag = "http_port"; public const string DiscoveryPortTag = "disc_port"; - public const string wsPortTag = "ws_port"; public const string AccountsFilename = "accounts.csv"; public override string AppName => "geth"; @@ -34,7 +33,6 @@ namespace GethPlugin var args = $"--http.addr 0.0.0.0 --http.port {httpPort.Number} --port {discovery.Number} --discovery.port {discovery.Number} {defaultArgs}"; var authRpc = AddInternalPort(); - var wsPort = AddInternalPort(tag: wsPortTag); if (config.BootstrapNode != null) { @@ -45,7 +43,7 @@ namespace GethPlugin args += bootstrapArg; } - return args + $" --authrpc.port {authRpc.Number} --ws --ws.addr 0.0.0.0 --ws.port {wsPort.Number}"; + return args + $" --authrpc.port {authRpc.Number} --ws --ws.addr 0.0.0.0 --ws.port {httpPort.Number}"; } private void UnlockAccounts(int startIndex, int numberOfAccounts) diff --git a/ProjectPlugins/GethPlugin/GethStarter.cs b/ProjectPlugins/GethPlugin/GethStarter.cs index f358b72..d5d275b 100644 --- a/ProjectPlugins/GethPlugin/GethStarter.cs +++ b/ProjectPlugins/GethPlugin/GethStarter.cs @@ -33,7 +33,7 @@ namespace GethPlugin if (discoveryPort == null) throw new Exception("Expected discovery port to be created."); var httpPort = container.Recipe.GetPortByTag(GethContainerRecipe.HttpPortTag); if (httpPort == null) throw new Exception("Expected http port to be created."); - var wsPort = container.Recipe.GetPortByTag(GethContainerRecipe.wsPortTag); + var wsPort = container.Recipe.GetPortByTag(GethContainerRecipe.HttpPortTag); if (wsPort == null) throw new Exception("Expected ws port to be created."); Log($"Geth node started.");