- long ret = bindings.BestBlock_new(block_hash, height);
- if (ret < 1024) { return null; }
- BestBlock ret_hu_conv = new BestBlock(null, ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ long ret = bindings.BestBlock_new(InternalUtils.check_arr_len(block_hash, 32), height);
+ Reference.reachabilityFence(block_hash);
+ Reference.reachabilityFence(height);
+ 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); };