+ /**
+ * The block's hash
+ */
+ public byte[] get_block_hash() {
+ byte[] ret = bindings.BestBlock_get_block_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The block's hash
+ */
+ public void set_block_hash(byte[] val) {
+ bindings.BestBlock_set_block_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The height at which the block was confirmed.
+ */
+ public int get_height() {
+ int ret = bindings.BestBlock_get_height(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The height at which the block was confirmed.
+ */
+ public void set_height(int val) {
+ bindings.BestBlock_set_height(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Constructs a new BestBlock given each field
+ */
+ public static BestBlock of(byte[] block_hash_arg, int height_arg) {
+ long ret = bindings.BestBlock_new(InternalUtils.check_arr_len(block_hash_arg, 32), height_arg);
+ Reference.reachabilityFence(block_hash_arg);
+ Reference.reachabilityFence(height_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+