public void ProcessPendingTransactions(DateTime date, string miner) { Block lastBlock = Chain.Last(); Block newBlock = new Block(date, lastBlock, PendingTransactions); newBlock.Transactions.Add(new Transaction(null, miner, Reward, date)); newBlock.Mine(Difficulty); AddUsersOfBlock(newBlock); Chain.Add(newBlock); PendingTransactions.Clear(); }
public void Clear() { PendingTransactions.Clear(); RegisteredTransactions.Clear(); }