示例#1
0
        public void VerifyChain()
        {
            if(HeadBlock == null)
            {
                throw new InvalidOperationException("Genesis block not set");
            }

            bool isValid = HeadBlock.IsValidChain(null, true);
        }
示例#2
0
        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");
        }
示例#4
0
        public bool VerifyChain()
        {
            if (HeadBlock == null)
            {
                return(false);
            }

            bool isValid = HeadBlock.IsValidChain(null, true);

            if (isValid)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#5
0
        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. ");
            }
        }
示例#6
0
        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");
            }
        }