Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / HTLCFailChannelUpdate.java
index 92a5c0188bf302edd9dd66b14f677648994b02b7..7ce939f9613ca9a5663ae75cc84c0b314e668eed 100644 (file)
@@ -5,6 +5,12 @@ import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
 
+
+/**
+ * The information we received from a peer along the route of a payment we originated. This is
+ * returned by ChannelMessageHandler::handle_update_fail_htlc to be passed into
+ * RoutingMessageHandler::handle_htlc_fail_channel_update to update our network map.
+ */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class HTLCFailChannelUpdate extends CommonBase {
        private HTLCFailChannelUpdate(Object _dummy, long ptr) { super(ptr); }
@@ -33,6 +39,7 @@ public class HTLCFailChannelUpdate extends CommonBase {
                        super(null, ptr);
                        long msg = obj.msg;
                        ChannelUpdate msg_hu_conv = new ChannelUpdate(null, msg);
+                       msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
        }
@@ -54,4 +61,14 @@ public class HTLCFailChannelUpdate extends CommonBase {
                        this.is_permanent = obj.is_permanent;
                }
        }
+       /**
+        * Creates a copy of the HTLCFailChannelUpdate
+        */
+       public HTLCFailChannelUpdate clone() {
+               long ret = bindings.HTLCFailChannelUpdate_clone(this.ptr);
+               HTLCFailChannelUpdate ret_hu_conv = HTLCFailChannelUpdate.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }