Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 3
0
        /// <summary>
        /// Returns a copy of the block, but without any transactions.
        /// </summary>
        /// <returns></returns>
        public Block cloneAsHeader()
        {
            EnsureParsedHeader();

            return(new Block(Parameters)
            {
                nonce = nonce,
                PreviousBlockHash = PreviousBlockHash.Duplicate(),
                MerkleRoot = MerkleRoot.Duplicate(),
                Version = Version,
                TimeSeconds = TimeSeconds,
                DifficultyTarget = DifficultyTarget,
                Transactions = null,
                hash = Hash.Duplicate()
            });
        }