public void ProcessNewBlock() { var TxsSize = 0; var block = new Block(); block.Index = BlockPool.Get().GetBlocks().Keys.Max() + 1; while (pool.Count > 0 && TxsSize < BlockTxLimit) { var next = GetNext(); block.AddTx(next); } if (!BlockValidator.IsValid(block)) { Console.WriteLine("Block is not valid"); return; } BlockPool.Get().AddBlock(block); }