Пример #1
0
        internal static void StaticWrite(BitcoinStream bs, byte[] bytes)
        {
            var len = bytes == null ? 0 : (ulong)bytes.Length;

            if (len > (uint)bs.MaxArraySize)
            {
                throw new ArgumentOutOfRangeException("Array size too big");
            }
            VarInt.StaticWrite(bs, len);
            if (bytes != null)
            {
                bs.ReadWrite(ref bytes);
            }
        }
Пример #2
0
 internal static void StaticWrite(BitcoinStream bs, byte[] bytes)
 {
     VarInt.StaticWrite(bs, (ulong)bytes.Length);
     bs.ReadWrite(ref bytes);
 }