2023-04-14 07:54:07 +00:00
|
|
|
|
using KubernetesWorkflow;
|
2023-04-25 09:31:15 +00:00
|
|
|
|
using Logging;
|
2023-04-18 13:33:12 +00:00
|
|
|
|
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;
|
2023-04-17 08:31:14 +00:00
|
|
|
|
PubKey = pubKey;
|
2023-04-18 11:22:41 +00:00
|
|
|
|
PrivateKey = privateKey;
|
2023-04-17 08:31:14 +00:00
|
|
|
|
DiscoveryPort = discoveryPort;
|
2023-04-14 07:54:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public RunningContainers RunningContainers { get; }
|
|
|
|
|
public string Account { get; }
|
2023-04-17 08:31:14 +00:00
|
|
|
|
public string PubKey { get; }
|
2023-04-18 11:22:41 +00:00
|
|
|
|
public string PrivateKey { get; }
|
2023-04-17 08:31:14 +00:00
|
|
|
|
public Port DiscoveryPort { get; }
|
2023-04-18 13:33:12 +00:00
|
|
|
|
|
2023-04-25 09:31:15 +00:00
|
|
|
|
public NethereumInteraction StartInteraction(BaseLog log)
|
2023-04-18 13:33:12 +00:00
|
|
|
|
{
|
|
|
|
|
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);
|
2023-04-18 13:33:12 +00:00
|
|
|
|
return creator.CreateWorkflow();
|
|
|
|
|
}
|
2023-04-14 07:54:07 +00:00
|
|
|
|
}
|
|
|
|
|
}
|