Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / BestBlock.java
index cda09d30f09453df56f4cb2f34cb1c59471aeee9..c0cb941c4d3edc721997050cf1ddcff691f1763e 100644 (file)
@@ -23,6 +23,7 @@ public class BestBlock extends CommonBase {
         */
        public BestBlock clone() {
                long ret = bindings.BestBlock_clone(this.ptr);
+               if (ret < 1024) { return null; }
                BestBlock ret_hu_conv = new BestBlock(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -34,6 +35,7 @@ public class BestBlock extends CommonBase {
         */
        public static BestBlock from_genesis(Network network) {
                long ret = bindings.BestBlock_from_genesis(network);
+               if (ret < 1024) { return null; }
                BestBlock ret_hu_conv = new BestBlock(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
@@ -44,6 +46,7 @@ public class BestBlock extends CommonBase {
         */
        public static BestBlock of(byte[] block_hash, int height) {
                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);
                return ret_hu_conv;