Exemplo n.º 1
0
        public BlockChain(Guid miningAdress, NetworkConsense networkConsense, CreateBlockDelegate createBlock = null)
        {
            _consense            = networkConsense;
            _blockFactory        = createBlock ?? BlockFactory.CreateBlock;
            _peddingTransactions = new Stack <Transaction>();
            MinerAdress          = miningAdress;

            _chain = new List <IBlock> {
                CreateGenesisBlock()
            };
        }
Exemplo n.º 2
0
 public static Transaction FromNetwork(NetworkConsense networkConsense, Guid address) =>
 new Transaction(Guid.Empty, address, networkConsense.MiningReward);