public static void Main(string[] args)
        {
            if (NodeSettings.PrintHelp(args, Network.StratisMain))
            {
                // NOTE: Add this if .AddRPC is added below
                // RPCSettings.PrintHelp(Network.StratisMain);
                return;
            }

            var network      = args.Contains("-testnet") ? InitStratisTest() : Network.StratisMain;
            var nodeSettings = NodeSettings.FromArguments(args, "stratis", network, ProtocolVersion.ALT_PROTOCOL_VERSION);

            // NOTES: running BTC and STRAT side by side is not possible yet as the flags for serialization are static

            var node = new FullNodeBuilder()
                       .UseNodeSettings(nodeSettings)
                       .UseStratisConsensus()
                       .UseBlockStore()
                       .UseMempool()
                       .UseWallet()
                       .AddPowPosMining()
                       .Build();

            Task.Delay(TimeSpan.FromMinutes(1)).ContinueWith(t =>
            {
                //TryStartPowMiner(args, node);
                //TryStartPosMiner(args, node);
            });

            node.Run();
        }
示例#2
0
        public static void Main(string[] args)
        {
            Logs.Configure(Logs.GetLoggerFactory(args));

            if (NodeSettings.PrintHelp(args, Network.Main))
            {
                return;
            }

            NodeSettings nodeSettings = NodeSettings.FromArguments(args);

            if (!Checks.VerifyAccess(nodeSettings))
            {
                return;
            }

            var node = new FullNodeBuilder()
                       .UseNodeSettings(nodeSettings)
                       .UseConsensus()
                       .UseBlockStore()
                       .UseMempool()
                       .AddMining()
                       .AddRPC()
                       .Build();

            // start the miner (this is temporary a miner should be started using RPC.
            Task.Delay(TimeSpan.FromMinutes(1)).ContinueWith((t) => { TryStartMiner(args, node); });

            node.Run();
        }
示例#3
0
        public static void Main(string[] args)
        {
            NodeSettings nodeSettings = NodeSettings.FromArguments(args);

            var node = new FullNodeBuilder()
                       .UseNodeSettings(nodeSettings)
                       .UseConsensus()
                       .UseBlockStore()
                       .UseMempool()
                       .AddMining()
                       .AddRPC()
                       .Build();

            node.Run();
        }
示例#4
0
        public static void Main(string[] args)
        {
            TraceSource ts = new TraceSource("NBitcoin");

            SourceSwitch sourceSwitch = new SourceSwitch("SourceSwitch", "Verbose");

            ts.Switch = sourceSwitch;
            ts.Listeners.Add(new ConsoleTraceListener());
            Console.WriteLine(ts.Listeners.Count);
            ts.TraceInformation("hello");

            var n             = Network.Main;
            var loggerFactory = new LoggerFactory()
                                .AddConsole(LogLevel.Debug, false);

            Logs.Configure(loggerFactory);

            var network = InitLLCoin();

            if (NodeSettings.PrintHelp(args, network))
            {
                return;
            }

            //var network = args.Contains("-testnet") ? InitStratisTest() : Network.StratisMain;


            var nodeSettings = NodeSettings.FromArguments(args, "stratis", network, ProtocolVersion.ALT_PROTOCOL_VERSION);

            // NOTES: running BTC and STRAT side by side is not possible yet as the flags for serialization are static

            var node = new FullNodeBuilder()
                       .UseNodeSettings(nodeSettings)
                       .UseStratisConsensus()
                       .UseBlockStore()
                       .UseMempool()
                       .AddPowPosMining()
                       .Build();

            Task.Delay(TimeSpan.FromMinutes(1)).ContinueWith(t =>
            {
                //TryStartPowMiner(args, node);
                //TryStartPosMiner(args, node);
            });

            node.Run();
        }
        public static void Main(string[] args)
        {
            Network      network      = args.Contains("-testnet") ? Network.StratisTest : Network.StratisMain;
            NodeSettings nodeSettings = NodeSettings.FromArguments(args, "stratis", network, ProtocolVersion.ALT_PROTOCOL_VERSION);

            // NOTES: running BTC and STRAT side by side is not possible yet as the flags for serialization are static

            var node = new FullNodeBuilder()
                       .UseNodeSettings(nodeSettings)
                       .UseStratisConsensus()
                       .UseBlockStore()
                       .UseMempool()
                       .UseWallet()
                       .AddPowPosMining()
                       .AddRPC()
                       .Build();

            node.Run();
        }
示例#6
0
        public static void Main(string[] args)
        {
            Network network = args.Contains("-testnet") ? Network.StratisTest : Network.StratisMain;

            if (NodeSettings.PrintHelp(args, network))
            {
                AzureIndexerSettings.PrintHelp(network);
                return;
            }

            NodeSettings nodeSettings = NodeSettings.FromArguments(args, "stratis", network, ProtocolVersion.ALT_PROTOCOL_VERSION);

            // NOTES: running BTC and STRAT side by side is not possible yet as the flags for serialization are static

            var node = new FullNodeBuilder()
                       .UseNodeSettings(nodeSettings)
                       .UseStratisConsensus()
                       .UseBlockStore()
                       .UseAzureIndexer()
                       .Build();

            node.Run();
        }