Sets geth http and ws port to same number.

This commit is contained in:
benbierens 2023-09-22 09:17:56 +02:00
parent 100a9f15b8
commit e0a734591f
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 2 additions and 4 deletions

View File

@ -9,7 +9,6 @@ namespace GethPlugin
public const string HttpPortTag = "http_port"; public const string HttpPortTag = "http_port";
public const string DiscoveryPortTag = "disc_port"; public const string DiscoveryPortTag = "disc_port";
public const string wsPortTag = "ws_port";
public const string AccountsFilename = "accounts.csv"; public const string AccountsFilename = "accounts.csv";
public override string AppName => "geth"; 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 args = $"--http.addr 0.0.0.0 --http.port {httpPort.Number} --port {discovery.Number} --discovery.port {discovery.Number} {defaultArgs}";
var authRpc = AddInternalPort(); var authRpc = AddInternalPort();
var wsPort = AddInternalPort(tag: wsPortTag);
if (config.BootstrapNode != null) if (config.BootstrapNode != null)
{ {
@ -45,7 +43,7 @@ namespace GethPlugin
args += bootstrapArg; 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) private void UnlockAccounts(int startIndex, int numberOfAccounts)

View File

@ -33,7 +33,7 @@ namespace GethPlugin
if (discoveryPort == null) throw new Exception("Expected discovery port to be created."); if (discoveryPort == null) throw new Exception("Expected discovery port to be created.");
var httpPort = container.Recipe.GetPortByTag(GethContainerRecipe.HttpPortTag); var httpPort = container.Recipe.GetPortByTag(GethContainerRecipe.HttpPortTag);
if (httpPort == null) throw new Exception("Expected http port to be created."); 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."); if (wsPort == null) throw new Exception("Expected ws port to be created.");
Log($"Geth node started."); Log($"Geth node started.");