Merge pull request #27 from TheBlueMatt/main
[ldk-c-bindings] / lightning-c-bindings / src / lightning / util / events.rs
index 2aea6ac993cc766a7e9252f1504b85a33a40ae96..cb28df82f252669b840434264f4e502570c29aae 100644 (file)
@@ -115,7 +115,8 @@ pub enum Event {
                /// now + 5*time_forwardable).
                time_forwardable: u64,
        },
-       /// Used to indicate that an output was generated on-chain which you should know how to spend.
+       /// Used to indicate that an output which you should know how to spend was confirmed on chain
+       /// and is now spendable.
        /// Such an output will *not* ever be spent by rust-lightning, and are not at risk of your
        /// counterparty spending them due to some kind of timeout. Thus, you need to store them
        /// somewhere and spend them when you create on-chain transactions.
@@ -1055,6 +1056,8 @@ pub struct MessageSendEventsProvider {
        /// Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
        pub free: Option<extern "C" fn(this_arg: *mut c_void)>,
 }
+unsafe impl Send for MessageSendEventsProvider {}
+unsafe impl Sync for MessageSendEventsProvider {}
 
 use lightning::util::events::MessageSendEventsProvider as rustMessageSendEventsProvider;
 impl rustMessageSendEventsProvider for MessageSendEventsProvider {
@@ -1122,6 +1125,8 @@ pub struct EventsProvider {
        /// Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
        pub free: Option<extern "C" fn(this_arg: *mut c_void)>,
 }
+unsafe impl Send for EventsProvider {}
+unsafe impl Sync for EventsProvider {}
 
 use lightning::util::events::EventsProvider as rustEventsProvider;
 /// Calls the free function if one is set
@@ -1148,6 +1153,8 @@ pub struct EventHandler {
        /// Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
        pub free: Option<extern "C" fn(this_arg: *mut c_void)>,
 }
+unsafe impl Send for EventHandler {}
+unsafe impl Sync for EventHandler {}
 
 use lightning::util::events::EventHandler as rustEventHandler;
 impl rustEventHandler for EventHandler {