[TS] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[ldk-java] / src / main / java / org / ldk / structs / NetworkUpdate.java
index 438a26fa31e8593b19b188ed83bd956cf94af2ed..e1d1be454199d5282dde2ac081c256262b8df736 100644 (file)
@@ -55,7 +55,7 @@ public class NetworkUpdate extends CommonBase {
        }
        /**
         * An error indicating that a channel failed to route a payment, which should be applied via
-        * [`NetworkGraph::channel_failed`].
+        * [`NetworkGraph::channel_failed_permanent`] if permanent.
         */
        public final static class ChannelFailure extends NetworkUpdate {
                /**
@@ -75,7 +75,7 @@ public class NetworkUpdate extends CommonBase {
        }
        /**
         * An error indicating that a node failed to route a payment, which should be applied via
-        * [`NetworkGraph::node_failed`].
+        * [`NetworkGraph::node_failed_permanent`] if permanent.
         */
        public final static class NodeFailure extends NetworkUpdate {
                /**
@@ -114,8 +114,8 @@ public class NetworkUpdate extends CommonBase {
        /**
         * Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate
         */
-       public static NetworkUpdate channel_update_message(ChannelUpdate msg) {
-               long ret = bindings.NetworkUpdate_channel_update_message(msg == null ? 0 : msg.ptr);
+       public static NetworkUpdate channel_update_message(org.ldk.structs.ChannelUpdate msg) {
+               long ret = bindings.NetworkUpdate_channel_update_message(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
@@ -150,6 +150,21 @@ public class NetworkUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NetworkUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(org.ldk.structs.NetworkUpdate b) {
+               boolean ret = bindings.NetworkUpdate_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof NetworkUpdate)) return false;
+               return this.eq((NetworkUpdate)o);
+       }
        /**
         * Serialize the NetworkUpdate object into a byte array which can be read by NetworkUpdate_read
         */