Пример #1
0
        /// <summary>
        /// Returns a copy of the block, but without any transactions.
        /// </summary>
        public Block CloneAsHeader()
        {
            var block = new Block(Params);

            block._nonce            = _nonce;
            block._prevBlockHash    = _prevBlockHash.Duplicate();
            block._merkleRoot       = MerkleRoot.Duplicate();
            block._version          = _version;
            block._time             = _time;
            block._difficultyTarget = _difficultyTarget;
            block.Transactions      = null;
            block._hash             = Hash.Duplicate();
            return(block);
        }
Пример #2
0
        /// <summary>
        /// Returns a copy of the block, but without any transactions.
        /// </summary>
        public Block CloneAsHeader()
        {
            var block = new Block(Params)
            {
                _nonce            = _nonce,
                _prevBlockHash    = _prevBlockHash.Duplicate(),
                _merkleRoot       = MerkleRoot.Duplicate(),
                _version          = _version,
                _time             = _time,
                _difficultyTarget = _difficultyTarget,
                Transactions      = null,
                _hash             = Hash.Duplicate()
            };

            return(block);
        }