2024-12-17 16:06:06 +01:00
|
|
|
|
using BlockchainUtils;
|
|
|
|
|
using Core;
|
2023-09-15 12:36:35 +02:00
|
|
|
|
|
|
|
|
|
namespace GethPlugin
|
|
|
|
|
{
|
|
|
|
|
public static class CoreInterfaceExtensions
|
|
|
|
|
{
|
2023-09-20 10:13:29 +02:00
|
|
|
|
public static GethDeployment DeployGeth(this CoreInterface ci, Action<IGethSetup> setup)
|
2023-09-20 09:16:57 +02:00
|
|
|
|
{
|
|
|
|
|
return Plugin(ci).DeployGeth(setup);
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-17 16:06:06 +01:00
|
|
|
|
public static IGethNode WrapGethDeployment(this CoreInterface ci, GethDeployment deployment, BlockCache blockCache)
|
2023-09-20 09:16:57 +02:00
|
|
|
|
{
|
2024-12-17 16:06:06 +01:00
|
|
|
|
return Plugin(ci).WrapGethDeployment(deployment, blockCache);
|
2023-09-20 09:16:57 +02:00
|
|
|
|
}
|
|
|
|
|
|
2024-12-17 16:06:06 +01:00
|
|
|
|
public static IGethNode StartGethNode(this CoreInterface ci, BlockCache blockCache, Action<IGethSetup> setup)
|
2023-09-15 15:52:02 +02:00
|
|
|
|
{
|
2023-09-20 09:16:57 +02:00
|
|
|
|
var deploy = DeployGeth(ci, setup);
|
2024-12-17 16:06:06 +01:00
|
|
|
|
return WrapGethDeployment(ci, deploy, blockCache);
|
2023-09-15 15:52:02 +02:00
|
|
|
|
}
|
2023-09-15 12:36:35 +02:00
|
|
|
|
|
2023-09-15 15:52:02 +02:00
|
|
|
|
private static GethPlugin Plugin(CoreInterface ci)
|
|
|
|
|
{
|
|
|
|
|
return ci.GetPlugin<GethPlugin>();
|
|
|
|
|
}
|
2023-09-15 12:36:35 +02:00
|
|
|
|
}
|
|
|
|
|
}
|