Beispiel #1
0
        public void MineBlock()
        {
            //have to send a message to the sender and recipient for the transaction has passed succesfully
            string prevHash  = chain.Count > 0 ? chain.ElementAt(chain.Count - 2) : "0";
            string timestamp = DateTime.Now.ToString();
            Block  block     = new Block(chain.Count, timestamp, transactions, prevHash);

            block.ComputeHash();
            chain.Add(block.ToString());
        }