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); } }
internal static void StaticWrite(BitcoinStream bs, byte[] bytes) { VarInt.StaticWrite(bs, (ulong)bytes.Length); bs.ReadWrite(ref bytes); }