import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import javax.annotation.Nullable;
/**
* `Persist` defines behavior for persisting channel monitors: this could mean
* stored channel data). Note that you **must** persist every new monitor to
* disk. See the `Persist` trait documentation for more details.
*
- * See [`ChannelMonitor::serialize_for_disk`] for writing out a `ChannelMonitor`,
+ * See [`ChannelMonitor::write`] for writing out a `ChannelMonitor`,
* and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
- *
- * [`ChannelMonitor::serialize_for_disk`]: struct.ChannelMonitor.html#method.serialize_for_disk
- * [`ChannelMonitorUpdateErr`]: enum.ChannelMonitorUpdateErr.html
*/
Result_NoneChannelMonitorUpdateErrZ persist_new_channel(OutPoint id, ChannelMonitor data);
/**
* them in batches. The size of each monitor grows `O(number of state updates)`
* whereas updates are small and `O(1)`.
*
- * See [`ChannelMonitor::serialize_for_disk`] for writing out a `ChannelMonitor`,
+ * See [`ChannelMonitor::write`] for writing out a `ChannelMonitor`,
* [`ChannelMonitorUpdate::write`] for writing out an update, and
* [`ChannelMonitorUpdateErr`] for requirements when returning errors.
- *
- * [`ChannelMonitor::update_monitor`]: struct.ChannelMonitor.html#impl-1
- * [`ChannelMonitor::serialize_for_disk`]: struct.ChannelMonitor.html#method.serialize_for_disk
- * [`ChannelMonitorUpdate::write`]: struct.ChannelMonitorUpdate.html#method.write
- * [`ChannelMonitorUpdateErr`]: enum.ChannelMonitorUpdateErr.html
*/
Result_NoneChannelMonitorUpdateErrZ update_persisted_channel(OutPoint id, ChannelMonitorUpdate update, ChannelMonitor data);
}
* stored channel data). Note that you **must** persist every new monitor to
* disk. See the `Persist` trait documentation for more details.
*
- * See [`ChannelMonitor::serialize_for_disk`] for writing out a `ChannelMonitor`,
+ * See [`ChannelMonitor::write`] for writing out a `ChannelMonitor`,
* and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
- *
- * [`ChannelMonitor::serialize_for_disk`]: struct.ChannelMonitor.html#method.serialize_for_disk
- * [`ChannelMonitorUpdateErr`]: enum.ChannelMonitorUpdateErr.html
*/
public Result_NoneChannelMonitorUpdateErrZ persist_new_channel(OutPoint id, ChannelMonitor data) {
long ret = bindings.Persist_persist_new_channel(this.ptr, id == null ? 0 : id.ptr & ~1, data == null ? 0 : data.ptr & ~1);
+ if (ret < 1024) { return null; }
Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
this.ptrs_to.add(id);
this.ptrs_to.add(data);
* them in batches. The size of each monitor grows `O(number of state updates)`
* whereas updates are small and `O(1)`.
*
- * See [`ChannelMonitor::serialize_for_disk`] for writing out a `ChannelMonitor`,
+ * See [`ChannelMonitor::write`] for writing out a `ChannelMonitor`,
* [`ChannelMonitorUpdate::write`] for writing out an update, and
* [`ChannelMonitorUpdateErr`] for requirements when returning errors.
- *
- * [`ChannelMonitor::update_monitor`]: struct.ChannelMonitor.html#impl-1
- * [`ChannelMonitor::serialize_for_disk`]: struct.ChannelMonitor.html#method.serialize_for_disk
- * [`ChannelMonitorUpdate::write`]: struct.ChannelMonitorUpdate.html#method.write
- * [`ChannelMonitorUpdateErr`]: enum.ChannelMonitorUpdateErr.html
*/
public Result_NoneChannelMonitorUpdateErrZ update_persisted_channel(OutPoint id, ChannelMonitorUpdate update, ChannelMonitor data) {
long ret = bindings.Persist_update_persisted_channel(this.ptr, id == null ? 0 : id.ptr & ~1, update == null ? 0 : update.ptr & ~1, data == null ? 0 : data.ptr & ~1);
+ if (ret < 1024) { return null; }
Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
this.ptrs_to.add(id);
this.ptrs_to.add(update);