public void VerifyChain() { if(HeadBlock == null) { throw new InvalidOperationException("Genesis block not set"); } bool isValid = HeadBlock.IsValidChain(null, true); }
public void VerifyChain() { if (HeadBlock == null) { throw new InvalidOperationException("Genesis block not set."); } var isValid = HeadBlock.IsValidChain(null, true); Console.WriteLine(isValid ? "Blockchain integrity intact." : "Blockchain integrity NOT intact."); }
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("Blockchainintegrity NOT intact"); }
public bool VerifyChain() { if (HeadBlock == null) { return(false); } bool isValid = HeadBlock.IsValidChain(null, true); if (isValid) { return(true); } else { return(false); } }
public void VerifyChain() { if (HeadBlock == null) { throw new InvalidOperationException(); } bool isValid = HeadBlock.IsValidChain(null, true); if (isValid) { Console.WriteLine("Blockchain integrity intack."); } else { Console.WriteLine("Blockchain integrity NOT intack. "); } }
public void VerifyChain() { if (HeadBlock == null) { throw new InvalidOperationException("Genesis block is not set"); } bool isValid = HeadBlock.IsValidChain(null, true); if (isValid) { Console.WriteLine("Block chain integrity intact"); } else { Console.WriteLine("Blockchain is not valid. Data has been tampered"); } }