[Java] Update auto-generated bindings to 0.0.115
[ldk-java] / src / main / java / org / ldk / structs / ChannelMonitor.java
index 53d68dc2b3cbcca5ac8e1ded3416f0a6cffdb436..2f05f3c9d5872927bd17fe2d1d199364fcc92135 100644 (file)
@@ -161,7 +161,7 @@ public class ChannelMonitor extends CommonBase {
         * This is called by the [`EventsProvider::process_pending_events`] implementation for
         * [`ChainMonitor`].
         * 
-        * [`EventsProvider::process_pending_events`]: crate::util::events::EventsProvider::process_pending_events
+        * [`EventsProvider::process_pending_events`]: crate::events::EventsProvider::process_pending_events
         * [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor
         */
        public Event[] get_and_clear_pending_events() {
@@ -384,6 +384,24 @@ public class ChannelMonitor extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Triggers rebroadcasts/fee-bumps of pending claims from a force-closed channel. This is
+        * crucial in preventing certain classes of pinning attacks, detecting substantial mempool
+        * feerate changes between blocks, and ensuring reliability if broadcasting fails. We recommend
+        * invoking this every 30 seconds, or lower if running in an environment with spotty
+        * connections, like on mobile.
+        */
+       public void rebroadcast_pending_claims(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
+               bindings.ChannelMonitor_rebroadcast_pending_claims(this.ptr, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(broadcaster);
+               Reference.reachabilityFence(fee_estimator);
+               Reference.reachabilityFence(logger);
+               if (this != null) { this.ptrs_to.add(broadcaster); };
+               if (this != null) { this.ptrs_to.add(fee_estimator); };
+               if (this != null) { this.ptrs_to.add(logger); };
+       }
+
        /**
         * Gets the balances in this channel which are either claimable by us if we were to
         * force-close the channel now or which are claimable on-chain (possibly awaiting