Esempio n. 1
0
        /**
         * Create genesis block
         **/
        public static Block GenesisBlock(IList <Transaction> transactions)
        {
            var ts = 1498018714; //21 june 2017

            // for genesis bloc we set creatoris first of Genesis Account
            var validator = Genesis.GetAll().FirstOrDefault();
            var block     = new Block
            {
                Height       = 0,
                TimeStamp    = ts,
                PrevHash     = "-",
                Transactions = transactions,
                Validator    = validator.Address
            };

            block.Build();

            return(block);
        }