- public static QueryChannelRange constructor_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg) {
- long ret = bindings.QueryChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg);
- QueryChannelRange ret_hu_conv = new QueryChannelRange(null, ret);
+ /**
+ * Constructs a new QueryChannelRange given each field
+ */
+ public static QueryChannelRange of(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg) {
+ long ret = bindings.QueryChannelRange_new(InternalUtils.check_arr_len(chain_hash_arg, 32), first_blocknum_arg, number_of_blocks_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ QueryChannelRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new QueryChannelRange(null, ret); }
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);