- public void set_timestamp_range(GossipTimestampFilter this_ptr, int val) {
- bindings.GossipTimestampFilter_set_timestamp_range(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; }
+ GossipTimestampFilter ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new GossipTimestampFilter(null, ret); }
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;