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) {
.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,
};
.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();
-
- LDKChannelManager cm = ChannelManager_new(net, fee_est, mon, broadcast, logger, keys_source, config, 0);
+ LDKThirtyTwoBytes chain_tip;
+ memset(&chain_tip, 0, 32);
+ LDKChainParameters chain = ChainParameters_new(net, chain_tip, 0);
+ LDKChannelManager cm = ChannelManager_new(fee_est, mon, broadcast, logger, keys_source, config, chain);
LDKCVec_ChannelDetailsZ channels = ChannelManager_list_channels(&cm);
assert((unsigned long)channels.data < 4096); // There's an offset, but it should still be an offset against null in the 0 page