Skip to content

Instantly share code, notes, and snippets.

@FrqSalah
Created January 27, 2024 20:43
Show Gist options
  • Save FrqSalah/13f64045ef5934e6d89694de1091b1cb to your computer and use it in GitHub Desktop.
Save FrqSalah/13f64045ef5934e6d89694de1091b1cb to your computer and use it in GitHub Desktop.
test blockhain methods
static void Main(string[] args)
{
var blockchain = new Blockchain();
blockchain.AddBlock("Block 1");
blockchain.AddBlock("Block 2");
blockchain.AddBlock("Block 3");
Console.WriteLine("Is blockchain valid? " + blockchain.IsValid());
Console.WriteLine("Latest block: " + blockchain.GetLatestBlock().Data);
Console.ReadKey();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment