Blockchain, Dotnet, Software Engineering, Technology, Programming.
CreateGenesisBlock() { return new Block(0, DateTime.Now, "Genesis Block", "0"); } public Block GetLatestBlock() { return Chain[Chain.Count - 1]; } public void AddBlock(Block newBlock) { newBlock.PreviousHash = GetLatestBlock().Hash; newBlock.Hash = newBlock.CalculateHash(); Chain.Add(newBlock); } }