public void verifyChain() { if (HeadBlock == null) { throw new InvalidOperationException("Genesis block not set."); } bool isValid = HeadBlock.isValidChain(null, true); if (isValid) { Console.WriteLine("Blockchain integrity intact."); } else { Console.WriteLine("Blockchain integrity NOT intact."); } }