//Mines block private void newBlock_Click(object sender, EventArgs e) { List <Transaction> transactions = blockchain.getPendingTransactions(); Block newBlock = new Block(blockchain.GetLastBlock(), transactions, publicKey.Text); blockchain.Blocks.Add(newBlock); richTextBox1.Text = blockchain.ToString(); }
private void newBlock_Click(object sender, EventArgs e) { // transactions to be included within the new block. List <Transaction> transactions = blockchain.getPendingTransactions(); // Create the new block w/ the transactions from the pool Block newBlock = new Block(blockchain.getPrevBlock(), transactions, publicKey.Text); // the block w/ transactions is added to the blockchain blockchain.Blocks.Add(newBlock); // the blockchain is printed to the UI. richTextBox1.Text = blockchain.ToString(); }