return empty_htlc_vec;
}
+void never_handle_event(const void *this_arg, struct LDKEvent event) {
+ // Note that we never actually generate any events to handle in the code below.
+ assert(false);
+}
+
int main() {
uint8_t node_seed[32];
memset(node_seed, 0, 32);
CVec_ChannelDetailsZ_free(channels);
LDKEventsProvider prov = ChannelManager_as_EventsProvider(&cm);
- LDKCVec_EventZ events = (prov.get_and_clear_pending_events)(prov.this_arg);
- assert((unsigned long)events.data < 4096); // There's an offset, but it should still be an offset against null in the 0 page
- assert(events.datalen == 0);
+ // Check that no events were generated by asserting if any events are passed to never_handle_event.
+ LDKEventHandler handler = { .handle_event = never_handle_event, .free = NULL };
+ (prov.process_pending_events)(prov.this_arg, handler);
ChannelManager_free(cm);
KeysManager_free(keys);