public static native void ChannelManager_block_connected(long this_arg, byte[] header, long[] txdata, int height);
// void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
public static native void ChannelManager_block_disconnected(long this_arg, byte[] header);
+ // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
+ public static native boolean ChannelManager_await_persistable_update_timeout(long this_arg, long max_wait);
// void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
public static native void ChannelManager_await_persistable_update(long this_arg);
// struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
bindings.ChannelManager_block_disconnected(this.ptr, header);
}
+ /**
+ * Blocks until ChannelManager needs to be persisted or a timeout is reached. It returns a bool
+ * indicating whether persistence is necessary. Only one listener on
+ * `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
+ * up.
+ * Note that the feature `allow_wallclock_use` must be enabled to use this function.
+ */
+ public boolean await_persistable_update_timeout(long max_wait) {
+ boolean ret = bindings.ChannelManager_await_persistable_update_timeout(this.ptr, max_wait);
+ return ret;
+ }
+
/**
* Blocks until ChannelManager needs to be persisted. Only one listener on
* `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
ChannelManager_block_disconnected(&this_arg_conv, header_ref);
}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1await_1persistable_1update_1timeout(JNIEnv *env, jclass clz, int64_t this_arg, int64_t max_wait) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = (void*)(this_arg & (~1));
+ this_arg_conv.is_owned = false;
+ jboolean ret_val = ChannelManager_await_persistable_update_timeout(&this_arg_conv, max_wait);
+ return ret_val;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1await_1persistable_1update(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1disconnected
(JNIEnv *, jclass, jlong, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelManager_await_persistable_update_timeout
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelManager_1await_1persistable_1update_1timeout
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_await_persistable_update
ChannelManager_block_disconnected(&this_arg_conv, header_ref);
}
+jboolean __attribute__((visibility("default"))) TS_ChannelManager_await_persistable_update_timeout(uint32_t this_arg, int64_t max_wait) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = (void*)(this_arg & (~1));
+ this_arg_conv.is_owned = false;
+ jboolean ret_val = ChannelManager_await_persistable_update_timeout(&this_arg_conv, max_wait);
+ return ret_val;
+}
+
void __attribute__((visibility("default"))) TS_ChannelManager_await_persistable_update(uint32_t this_arg) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = (void*)(this_arg & (~1));
const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
// debug statements here
}
+ // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
+ export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
+ return nativeResponseValue;
+ }
// void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
export function ChannelManager_await_persistable_update(this_arg: number): void {
if(!isWasmInitialized) {
bindings.ChannelManager_block_disconnected(this.ptr, header);
}
+ public boolean await_persistable_update_timeout(number max_wait) {
+ boolean ret = bindings.ChannelManager_await_persistable_update_timeout(this.ptr, max_wait);
+ return ret;
+ }
+
public void await_persistable_update() {
bindings.ChannelManager_await_persistable_update(this.ptr);
}