X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Fdemo.c;h=3f7c4be9d2fe2b9307d51173f15702c995a5949e;hb=e012c4c6ab8540e3918cb780277c4f7483d75f5a;hp=645c95bc4a889c944e3290451226064cd6690ed3;hpb=343aacc50c73e18ddb1ec52570c5050bdccd09ca;p=rust-lightning diff --git a/lightning-c-bindings/demo.c b/lightning-c-bindings/demo.c index 645c95bc4..3f7c4be9d 100644 --- a/lightning-c-bindings/demo.c +++ b/lightning-c-bindings/demo.c @@ -19,6 +19,7 @@ uint32_t get_fee(const void *this_arg, LDKConfirmationTarget target) { void broadcast_tx(const void *this_arg, LDKTransaction tx) { //TODO + Transaction_free(tx); } LDKCResult_NoneChannelMonitorUpdateErrZ add_channel_monitor(const void *this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) { @@ -53,11 +54,11 @@ int main() { .free = NULL }; - LDKManyChannelMonitor mon = { + LDKWatch mon = { .this_arg = NULL, - .add_monitor = add_channel_monitor, - .update_monitor = update_channel_monitor, - .get_and_clear_pending_monitor_events = monitors_pending_monitor_events, + .watch_channel = add_channel_monitor, + .update_channel = update_channel_monitor, + .release_pending_monitor_events = monitors_pending_monitor_events, .free = NULL, }; @@ -67,7 +68,7 @@ int main() { .free = NULL, }; - LDKKeysManager keys = KeysManager_new(&node_seed, net, 0, 0); + LDKKeysManager keys = KeysManager_new(&node_seed, 0, 0); LDKKeysInterface keys_source = KeysManager_as_KeysInterface(&keys); LDKUserConfig config = UserConfig_default();