-/// If:
-/// (1) a channel has been force closed and
-/// (2) we receive a preimage from a forward link that allows us to spend an HTLC output on
-/// this channel's (the backward link's) broadcasted commitment transaction
-/// then we allow the `ChannelManager` to send a `ChannelMonitorUpdate` with this update ID,
-/// with the update providing said payment preimage. No other update types are allowed after
-/// force-close.
+/// Checks if two ChannelMonitorUpdates contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn ChannelMonitorUpdate_eq(a: &ChannelMonitorUpdate, b: &ChannelMonitorUpdate) -> bool {
+ if a.inner == b.inner { return true; }
+ if a.inner.is_null() || b.inner.is_null() { return false; }
+ if a.get_native_ref() == b.get_native_ref() { true } else { false }
+}
+/// The update ID used for a [`ChannelMonitorUpdate`] that is either:
+///
+///\t(1) attempting to force close the channel by broadcasting our latest commitment transaction or
+///\t(2) providing a preimage (after the channel has been force closed) from a forward link that
+///\t\tallows us to spend an HTLC output on this channel's (the backward link's) broadcasted
+///\t\tcommitment transaction.
+///
+/// No other [`ChannelMonitorUpdate`]s are allowed after force-close.