Ejemplo n.º 1
0
//C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
//ORIGINAL LINE: const Crypto::Hash& getBlockHash() const
        public Crypto.Hash getBlockHash()
        {
            if (!blockHash.is_initialized())
            {
                BinaryArray blockBinaryArray = getBlockHashingBinaryArray();
                if (BLOCK_MAJOR_VERSION_2 <= block.majorVersion)
                {
                    auto parentBlock = getParentBlockHashingBinaryArray(false);
                    blockBinaryArray.insert(blockBinaryArray.end(), parentBlock.begin(), parentBlock.end());
                }

                blockHash = CryptoNote.GlobalMembers.getObjectHash(blockBinaryArray);
            }

            return(blockHash.get());
        }