Update bindings demo apps for new code upstream
[rust-lightning] / lightning-c-bindings / demo.c
index 645c95bc4a889c944e3290451226064cd6690ed3..0f8bd102a48189be60b5156a686297a54fd2ac60 100644 (file)
@@ -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,
        };