cs-codex-dist-tests/DistTestCore/Marketplace/GethBootstrapNodeInfo.cs

36 lines
1.2 KiB
C#
Raw Normal View History

2023-04-14 07:54:07 +00:00
using KubernetesWorkflow;
2023-04-25 09:31:15 +00:00
using Logging;
using NethereumWorkflow;
2023-04-14 07:54:07 +00:00
namespace DistTestCore.Marketplace
{
public class GethBootstrapNodeInfo
{
2023-04-19 05:59:28 +00:00
public GethBootstrapNodeInfo(RunningContainers runningContainers, string account, string pubKey, string privateKey, Port discoveryPort)
2023-04-14 07:54:07 +00:00
{
RunningContainers = runningContainers;
Account = account;
PubKey = pubKey;
2023-04-18 11:22:41 +00:00
PrivateKey = privateKey;
DiscoveryPort = discoveryPort;
2023-04-14 07:54:07 +00:00
}
public RunningContainers RunningContainers { get; }
public string Account { get; }
public string PubKey { get; }
2023-04-18 11:22:41 +00:00
public string PrivateKey { get; }
public Port DiscoveryPort { get; }
2023-04-25 09:31:15 +00:00
public NethereumInteraction StartInteraction(BaseLog log)
{
var ip = RunningContainers.RunningPod.Cluster.IP;
var port = RunningContainers.Containers[0].ServicePorts[0].Number;
var account = Account;
var privateKey = PrivateKey;
2023-04-25 09:31:15 +00:00
var creator = new NethereumInteractionCreator(log, ip, port, account, privateKey);
return creator.CreateWorkflow();
}
2023-04-14 07:54:07 +00:00
}
}