Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / MessageSendEvent.java
index 670c5b427fb89cd6a6c9f23230910d85c29a0c91..2f8e79d313cd76be3354006fd4deb990d83041de 100644 (file)
@@ -70,9 +70,6 @@ public class MessageSendEvent extends CommonBase {
                if (raw_val.getClass() == bindings.LDKMessageSendEvent.HandleError.class) {
                        return new HandleError(ptr, (bindings.LDKMessageSendEvent.HandleError)raw_val);
                }
-               if (raw_val.getClass() == bindings.LDKMessageSendEvent.PaymentFailureNetworkUpdate.class) {
-                       return new PaymentFailureNetworkUpdate(ptr, (bindings.LDKMessageSendEvent.PaymentFailureNetworkUpdate)raw_val);
-               }
                if (raw_val.getClass() == bindings.LDKMessageSendEvent.SendChannelRangeQuery.class) {
                        return new SendChannelRangeQuery(ptr, (bindings.LDKMessageSendEvent.SendChannelRangeQuery)raw_val);
                }
@@ -98,7 +95,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       AcceptChannel msg_hu_conv = new AcceptChannel(null, msg);
+                       AcceptChannel msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new AcceptChannel(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -116,7 +113,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       OpenChannel msg_hu_conv = new OpenChannel(null, msg);
+                       OpenChannel msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new OpenChannel(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -134,7 +131,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       FundingCreated msg_hu_conv = new FundingCreated(null, msg);
+                       FundingCreated msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new FundingCreated(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -152,7 +149,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       FundingSigned msg_hu_conv = new FundingSigned(null, msg);
+                       FundingSigned msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new FundingSigned(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -170,7 +167,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       FundingLocked msg_hu_conv = new FundingLocked(null, msg);
+                       FundingLocked msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new FundingLocked(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -188,7 +185,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       AnnouncementSignatures msg_hu_conv = new AnnouncementSignatures(null, msg);
+                       AnnouncementSignatures msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new AnnouncementSignatures(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -206,7 +203,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long updates = obj.updates;
-                       CommitmentUpdate updates_hu_conv = new CommitmentUpdate(null, updates);
+                       CommitmentUpdate updates_hu_conv = null; if (updates < 0 || updates > 4096) { updates_hu_conv = new CommitmentUpdate(null, updates); }
                        updates_hu_conv.ptrs_to.add(this);
                        this.updates = updates_hu_conv;
                }
@@ -224,7 +221,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       RevokeAndACK msg_hu_conv = new RevokeAndACK(null, msg);
+                       RevokeAndACK msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new RevokeAndACK(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -242,7 +239,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       ClosingSigned msg_hu_conv = new ClosingSigned(null, msg);
+                       ClosingSigned msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new ClosingSigned(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -260,7 +257,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       Shutdown msg_hu_conv = new Shutdown(null, msg);
+                       Shutdown msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new Shutdown(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -278,7 +275,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       ChannelReestablish msg_hu_conv = new ChannelReestablish(null, msg);
+                       ChannelReestablish msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new ChannelReestablish(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -295,11 +292,11 @@ public class MessageSendEvent extends CommonBase {
                private BroadcastChannelAnnouncement(long ptr, bindings.LDKMessageSendEvent.BroadcastChannelAnnouncement obj) {
                        super(null, ptr);
                        long msg = obj.msg;
-                       ChannelAnnouncement msg_hu_conv = new ChannelAnnouncement(null, msg);
+                       ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new ChannelAnnouncement(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                        long update_msg = obj.update_msg;
-                       ChannelUpdate update_msg_hu_conv = new ChannelUpdate(null, update_msg);
+                       ChannelUpdate update_msg_hu_conv = null; if (update_msg < 0 || update_msg > 4096) { update_msg_hu_conv = new ChannelUpdate(null, update_msg); }
                        update_msg_hu_conv.ptrs_to.add(this);
                        this.update_msg = update_msg_hu_conv;
                }
@@ -312,7 +309,7 @@ public class MessageSendEvent extends CommonBase {
                private BroadcastNodeAnnouncement(long ptr, bindings.LDKMessageSendEvent.BroadcastNodeAnnouncement obj) {
                        super(null, ptr);
                        long msg = obj.msg;
-                       NodeAnnouncement msg_hu_conv = new NodeAnnouncement(null, msg);
+                       NodeAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new NodeAnnouncement(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -325,7 +322,7 @@ public class MessageSendEvent extends CommonBase {
                private BroadcastChannelUpdate(long ptr, bindings.LDKMessageSendEvent.BroadcastChannelUpdate obj) {
                        super(null, ptr);
                        long msg = obj.msg;
-                       ChannelUpdate msg_hu_conv = new ChannelUpdate(null, msg);
+                       ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new ChannelUpdate(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -343,7 +340,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       ChannelUpdate msg_hu_conv = new ChannelUpdate(null, msg);
+                       ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new ChannelUpdate(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -366,19 +363,6 @@ public class MessageSendEvent extends CommonBase {
                        this.action = action_hu_conv;
                }
        }
-       public final static class PaymentFailureNetworkUpdate extends MessageSendEvent {
-               /**
-                * The channel/node update which should be sent to NetGraphMsgHandler
-               */
-               public final HTLCFailChannelUpdate update;
-               private PaymentFailureNetworkUpdate(long ptr, bindings.LDKMessageSendEvent.PaymentFailureNetworkUpdate obj) {
-                       super(null, ptr);
-                       long update = obj.update;
-                       HTLCFailChannelUpdate update_hu_conv = HTLCFailChannelUpdate.constr_from_ptr(update);
-                       update_hu_conv.ptrs_to.add(this);
-                       this.update = update_hu_conv;
-               }
-       }
        public final static class SendChannelRangeQuery extends MessageSendEvent {
                /**
                 * The node_id of this message recipient
@@ -392,7 +376,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       QueryChannelRange msg_hu_conv = new QueryChannelRange(null, msg);
+                       QueryChannelRange msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new QueryChannelRange(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -410,7 +394,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       QueryShortChannelIds msg_hu_conv = new QueryShortChannelIds(null, msg);
+                       QueryShortChannelIds msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new QueryShortChannelIds(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -428,7 +412,7 @@ public class MessageSendEvent extends CommonBase {
                        super(null, ptr);
                        this.node_id = obj.node_id;
                        long msg = obj.msg;
-                       ReplyChannelRange msg_hu_conv = new ReplyChannelRange(null, msg);
+                       ReplyChannelRange msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new ReplyChannelRange(null, msg); }
                        msg_hu_conv.ptrs_to.add(this);
                        this.msg = msg_hu_conv;
                }
@@ -438,7 +422,7 @@ public class MessageSendEvent extends CommonBase {
         */
        public MessageSendEvent clone() {
                long ret = bindings.MessageSendEvent_clone(this.ptr);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -449,10 +433,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_accept_channel(byte[] node_id, AcceptChannel msg) {
                long ret = bindings.MessageSendEvent_send_accept_channel(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -461,10 +444,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_open_channel(byte[] node_id, OpenChannel msg) {
                long ret = bindings.MessageSendEvent_send_open_channel(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -473,10 +455,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_funding_created(byte[] node_id, FundingCreated msg) {
                long ret = bindings.MessageSendEvent_send_funding_created(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -485,10 +466,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_funding_signed(byte[] node_id, FundingSigned msg) {
                long ret = bindings.MessageSendEvent_send_funding_signed(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -497,10 +477,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_funding_locked(byte[] node_id, FundingLocked msg) {
                long ret = bindings.MessageSendEvent_send_funding_locked(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -509,10 +488,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_announcement_signatures(byte[] node_id, AnnouncementSignatures msg) {
                long ret = bindings.MessageSendEvent_send_announcement_signatures(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -521,10 +499,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent update_htlcs(byte[] node_id, CommitmentUpdate updates) {
                long ret = bindings.MessageSendEvent_update_htlcs(node_id, updates == null ? 0 : updates.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(updates);
                return ret_hu_conv;
        }
 
@@ -533,10 +510,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_revoke_and_ack(byte[] node_id, RevokeAndACK msg) {
                long ret = bindings.MessageSendEvent_send_revoke_and_ack(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -545,10 +521,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_closing_signed(byte[] node_id, ClosingSigned msg) {
                long ret = bindings.MessageSendEvent_send_closing_signed(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -557,10 +532,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_shutdown(byte[] node_id, Shutdown msg) {
                long ret = bindings.MessageSendEvent_send_shutdown(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -569,10 +543,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_channel_reestablish(byte[] node_id, ChannelReestablish msg) {
                long ret = bindings.MessageSendEvent_send_channel_reestablish(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -581,11 +554,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent broadcast_channel_announcement(ChannelAnnouncement msg, ChannelUpdate update_msg) {
                long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0 : msg.ptr & ~1, update_msg == null ? 0 : update_msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
-               ret_hu_conv.ptrs_to.add(update_msg);
                return ret_hu_conv;
        }
 
@@ -594,10 +565,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent broadcast_node_announcement(NodeAnnouncement msg) {
                long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -606,10 +576,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent broadcast_channel_update(ChannelUpdate msg) {
                long ret = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -618,10 +587,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_channel_update(byte[] node_id, ChannelUpdate msg) {
                long ret = bindings.MessageSendEvent_send_channel_update(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -630,18 +598,7 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent handle_error(byte[] node_id, ErrorAction action) {
                long ret = bindings.MessageSendEvent_handle_error(node_id, action.ptr);
-               if (ret < 1024) { return null; }
-               MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               return ret_hu_conv;
-       }
-
-       /**
-        * Utility method to constructs a new PaymentFailureNetworkUpdate-variant MessageSendEvent
-        */
-       public static MessageSendEvent payment_failure_network_update(HTLCFailChannelUpdate update) {
-               long ret = bindings.MessageSendEvent_payment_failure_network_update(update.ptr);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
@@ -652,10 +609,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_channel_range_query(byte[] node_id, QueryChannelRange msg) {
                long ret = bindings.MessageSendEvent_send_channel_range_query(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -664,10 +620,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_short_ids_query(byte[] node_id, QueryShortChannelIds msg) {
                long ret = bindings.MessageSendEvent_send_short_ids_query(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }
 
@@ -676,10 +631,9 @@ public class MessageSendEvent extends CommonBase {
         */
        public static MessageSendEvent send_reply_channel_range(byte[] node_id, ReplyChannelRange msg) {
                long ret = bindings.MessageSendEvent_send_reply_channel_range(node_id, msg == null ? 0 : msg.ptr & ~1);
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(msg);
                return ret_hu_conv;
        }