2
0
mirror of synced 2025-02-11 07:56:58 +00:00

49 lines
1.2 KiB
C#
Raw Normal View History

2023-09-15 12:36:35 +02:00
namespace GethPlugin
{
2023-09-15 15:52:02 +02:00
public interface IGethSetup
2023-09-15 12:36:35 +02:00
{
2023-09-15 15:52:02 +02:00
IGethSetup IsMiner();
IGethSetup WithBootstrapNode(GethBootstrapNode node);
IGethSetup WithName(string name);
}
public class GethStartupConfig : IGethSetup
{
public bool IsMiner { get; private set; }
public GethBootstrapNode? BootstrapNode { get; private set; }
public string? NameOverride { get; private set; }
public IGethSetup WithBootstrapNode(GethBootstrapNode node)
{
BootstrapNode = node;
return this;
}
public IGethSetup WithName(string name)
{
NameOverride = name;
return this;
}
IGethSetup IGethSetup.IsMiner()
{
IsMiner = true;
return this;
}
}
public class GethBootstrapNode
{
public GethBootstrapNode(string publicKey, string ipAddress, int port)
2023-09-15 12:36:35 +02:00
{
2023-09-15 15:52:02 +02:00
PublicKey = publicKey;
IpAddress = ipAddress;
Port = port;
2023-09-15 12:36:35 +02:00
}
2023-09-15 15:52:02 +02:00
public string PublicKey { get; }
public string IpAddress { get; }
public int Port { get; }
2023-09-15 12:36:35 +02:00
}
}