-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathProgram.cs
More file actions
48 lines (44 loc) · 1.32 KB
/
Program.cs
File metadata and controls
48 lines (44 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Threading.Tasks;
using Blockcore;
using Blockcore.Builder;
using Blockcore.Configuration;
using Blockcore.Features.BlockStore;
using Blockcore.Features.ColdStaking;
using Blockcore.Features.Consensus;
using Blockcore.Features.Diagnostic;
using Blockcore.Features.MemoryPool;
using Blockcore.Features.Miner;
using Blockcore.Features.NodeHost;
using Blockcore.Features.RPC;
using Blockcore.Utilities;
namespace Terracoin.Daemon
{
public class Program
{
public static async Task Main(string[] args)
{
try
{
var nodeSettings = new NodeSettings(networksSelector: Networks.Networks.Terracoin, args: args);
IFullNodeBuilder nodeBuilder = new FullNodeBuilder()
.UseNodeSettings(nodeSettings)
.UseBlockStore()
.UsePosConsensus()
.UseMempool()
.UseColdStakingWallet()
.AddPowPosMining()
.UseNodeHost()
.AddRPC()
.UseDiagnosticFeature();
IFullNode node = nodeBuilder.Build();
if (node != null)
await node.RunAsync();
}
catch (Exception ex)
{
Console.WriteLine("There was a problem initializing the node. Details: '{0}'", ex);
}
}
}
}