- * Close a channel if a corresponding HTLC fail was sent.
- * If permanent, removes a channel from the local storage.
- * May cause the removal of nodes too, if this was their last channel.
- * If not permanent, makes channels unavailable for routing.
+ * Update channel from partial announcement data received via rapid gossip sync
+ *
+ * `timestamp: u64`: Timestamp emulating the backdated original announcement receipt (by the
+ * rapid gossip sync server)
+ *
+ * All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields.
+ */
+ public Result_NoneLightningErrorZ add_channel_from_partial_announcement(long short_channel_id, long timestamp, org.ldk.structs.ChannelFeatures features, byte[] node_id_1, byte[] node_id_2) {
+ long ret = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features == null ? 0 : features.ptr, InternalUtils.check_arr_len(node_id_1, 33), InternalUtils.check_arr_len(node_id_2, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(short_channel_id);
+ Reference.reachabilityFence(timestamp);
+ Reference.reachabilityFence(features);
+ Reference.reachabilityFence(node_id_1);
+ Reference.reachabilityFence(node_id_2);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(features); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Marks a channel in the graph as failed permanently.
+ *
+ * The channel and any node for which this was their last channel are removed from the graph.
+ */
+ public void channel_failed_permanent(long short_channel_id) {
+ bindings.NetworkGraph_channel_failed_permanent(this.ptr, short_channel_id);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(short_channel_id);
+ }
+
+ /**
+ * Marks a node in the graph as permanently failed, effectively removing it and its channels
+ * from local storage.