src/Stratis.SidechainDnsD/Program.cs
/// <summary>
/// The async entry point for the Stratis Dns process.
/// </summary>
/// <param name="args">Command line arguments.</param>
/// <returns>A task used to await the operation.</returns>
The async entry point for the Stratis Dns process.
The async entry point for the Stratis Dns process .
public static async Task MainAsync(string[] args)
        {
            try
            {
                var nodeSettings = new NodeSettings(networksSelector: FederatedPegNetwork.NetworksSelector, protocolVersion: ProtocolVersion.ALT_PROTOCOL_VERSION, args: args);
                var dnsSettings = new DnsSettings(nodeSettings);
                if (string.IsNullOrWhiteSpace(dnsSettings.DnsHostName) || string.IsNullOrWhiteSpace(dnsSettings.DnsNameServer) || string.IsNullOrWhiteSpace(dnsSettings.DnsMailBox))
                    throw new ConfigurationException("When running as a DNS Seed service, the -dnshostname, -dnsnameserver and -dnsmailbox arguments must be specified on the command line.");
                IFullNode node = new FullNodeBuilder()
                    .UseNodeSettings(nodeSettings)
                    .UseBlockStore()
                    .AddSmartContracts()
                    .UseSmartContractPoAConsensus()
                    .UseSmartContractPoAMining()
                    .UseSmartContractWallet()
                    .UseReflectionExecutor()
                    .UseMempool()
                    .UseApi()
                    .UseDns()
                    .Build();
                if (node != null)
                    await node.RunAsync();
            }
            catch (Exception ex)
            {
                Console.WriteLine("There was a problem initializing the node. Details: '{0}'", ex.ToString());
            }
        }
public static async Task MainAsync ( string [ ] args ) { try { var nodeSettings = new NodeSettings ( networksSelector : FederatedPegNetwork . NetworksSelector , protocolVersion : ProtocolVersion . ALT_PROTOCOL_VERSION , args : args ) ; var dnsSettings = new DnsSettings ( nodeSettings ) ; if ( string . IsNullOrWhiteSpace ( dnsSettings . DnsHostName ) || string . IsNullOrWhiteSpace ( dnsSettings . DnsNameServer ) || string . IsNullOrWhiteSpace ( dnsSettings . DnsMailBox ) ) throw new ConfigurationException ( " " ) ; IFullNode node = new FullNodeBuilder ( ) . UseNodeSettings ( nodeSettings ) . UseBlockStore ( ) . AddSmartContracts ( ) . UseSmartContractPoAConsensus ( ) . UseSmartContractPoAMining ( ) . UseSmartContractWallet ( ) . UseReflectionExecutor ( ) . UseMempool ( ) . UseApi ( ) . UseDns ( ) . Build ( ) ; if ( node != null ) await node . RunAsync ( ) ; } catch ( Exception ex ) { Console . WriteLine ( " " , ex . ToString ( ) ) ; } }
The async entry point for the Stratis Dns process.
The async entry point for the Stratis Dns process .
// Build the Dns full node. // Run node.
A task used to await the operation.
A task used to await the operation .
args
string[]
Command line arguments.
Command line arguments .