예제 #1
0
        private byte[] getCachedBitcoinSerialization()
        {
            // We have completely cached byte array.
            if (headerBytesValid && transactionBytesValid)
            {
                //Bytes should never be null if headerBytesValid && transactionBytesValid
                if (Length == Bytes.Length)
                {
                    return(Bytes);
                }

                // byte array is offset so copy out the correct range.
                return(Bytes.Duplicate(Offset, Length));
            }
            return(null);
        }