- public void set_first_timestamp(GossipTimestampFilter this_ptr, int val) {
- bindings.GossipTimestampFilter_set_first_timestamp(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
- this.ptrs_to.add(this_ptr);
+ /**
+ * The range of information in seconds
+ */
+ public void set_timestamp_range(int val) {
+ bindings.GossipTimestampFilter_set_timestamp_range(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Constructs a new GossipTimestampFilter given each field
+ */
+ public static GossipTimestampFilter of(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg) {
+ long ret = bindings.GossipTimestampFilter_new(InternalUtils.check_arr_len(chain_hash_arg, 32), first_timestamp_arg, timestamp_range_arg);
+ Reference.reachabilityFence(chain_hash_arg);
+ Reference.reachabilityFence(first_timestamp_arg);
+ Reference.reachabilityFence(timestamp_range_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.GossipTimestampFilter ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.GossipTimestampFilter(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;