Esempio n. 1
0
        public static Staker Build(Config config)
        {
            // create the context
            var staker = new Staker();

            staker.context = Context.Create(Network.Main, config);
            staker.BuildServices();
            return(staker);
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            var conf = new Config
            {
                FolderLocation        = AppContext.BaseDirectory,
                MaximumNodeConnection = 20,
                MaxBlocksInMemory     = 30000,
                ConnectedNodesToStake = 1,
                TrustedNodes          = new List <IPEndPoint> {
                    new IPEndPoint(IPAddress.Parse("127.0.0.1"), Network.Main.DefaultPort)
                }
                //TrustedNodes = new List<IPEndPoint> { new IPEndPoint(IPAddress.Parse("185.64.104.55"), Network.Main.DefaultPort) }
            };

            //conf.FirstLoadPrivateKey = Key.Parse("your staking prv key here", Network.Main);

            Staker.Build(conf).Run();
        }