Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 public void Clear()
 {
     PendingTransactions.Clear();
     RegisteredTransactions.Clear();
 }