Beispiel #1
0
        public Header(
            byte[] headerHash,
            uint version,
            byte[] hashPrevious,
            byte[] merkleRootHash,
            uint unixTimeSeconds,
            uint nBits,
            uint nonce)
        {
            Hash            = headerHash;
            Version         = version;
            HashPrevious    = hashPrevious;
            MerkleRoot      = merkleRootHash;
            UnixTimeSeconds = unixTimeSeconds;
            NBits           = nBits;
            Nonce           = nonce;

            Difficulty = MAX_TARGET /
                         (double)UInt256.ParseFromCompact(nBits);
        }
Beispiel #2
0
        public HeaderBitcoin(
            byte[] headerHash,
            uint version,
            byte[] hashPrevious,
            byte[] merkleRootHash,
            uint unixTimeSeconds,
            uint nBits,
            uint nonce
            ) : base(
                headerHash,
                hashPrevious,
                merkleRootHash,
                unixTimeSeconds)
        {
            Version = version;
            NBits   = nBits;
            Nonce   = nonce;

            Difficulty = MAX_TARGET /
                         (double)UInt256.ParseFromCompact(nBits);
        }