[Java] Update auto-generated Java bindings
[ldk-java] / src / main / java / org / ldk / structs / SignedRawInvoice.java
index 0a04c31a1fd381bd394b2cf0c6ab28422c691b4a..b8e833004de65dce5f5afaf4de114b871b5050dc 100644 (file)
@@ -33,7 +33,7 @@ public class SignedRawInvoice extends CommonBase {
                boolean ret = bindings.SignedRawInvoice_eq(this.ptr, b == null ? 0 : b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
-               this.ptrs_to.add(b);
+               if (this != null) { this.ptrs_to.add(b); };
                return ret;
        }
 
@@ -55,10 +55,22 @@ public class SignedRawInvoice extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.SignedRawInvoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SignedRawInvoice(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two SignedRawInvoices contain equal inner contents.
+        */
+       public long hash() {
+               long ret = bindings.SignedRawInvoice_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
        /**
         * Disassembles the `SignedRawInvoice` into its three parts:
         * 1. raw invoice
@@ -70,8 +82,8 @@ public class SignedRawInvoice extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               this.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               if (this != null) { this.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
@@ -83,15 +95,15 @@ public class SignedRawInvoice extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.RawInvoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RawInvoice(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
         * The hash of the `RawInvoice` that was signed.
         */
-       public byte[] hash() {
-               byte[] ret = bindings.SignedRawInvoice_hash(this.ptr);
+       public byte[] signable_hash() {
+               byte[] ret = bindings.SignedRawInvoice_signable_hash(this.ptr);
                Reference.reachabilityFence(this);
                return ret;
        }
@@ -104,7 +116,7 @@ public class SignedRawInvoice extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.InvoiceSignature ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceSignature(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }