Update auto-generated bindings
[ldk-c-bindings] / lightning-c-bindings / src / lightning / chain / chaininterface.rs
index b6c13b149147ee890bef477eb6625a0d25182724..7d8291d64fd2fa88dd4d5e671b04a856ab6c8630 100644 (file)
 //! Includes traits for monitoring and receiving notifications of new blocks and block
 //! disconnections, transaction broadcasting, and feerate information requests.
 
-use std::str::FromStr;
-use std::ffi::c_void;
+use alloc::str::FromStr;
+use core::ffi::c_void;
 use core::convert::Infallible;
 use bitcoin::hashes::Hash;
 use crate::c_types::*;
+#[cfg(feature="no-std")]
+use alloc::{vec::Vec, boxed::Box};
 
 /// An interface to send a transaction to the Bitcoin network.
 #[repr(C)]
@@ -50,7 +52,7 @@ impl rustBroadcasterInterface for BroadcasterInterface {
 
 // We're essentially a pointer already, or at least a set of pointers, so allow us to be used
 // directly as a Deref trait in higher-level structs:
-impl std::ops::Deref for BroadcasterInterface {
+impl core::ops::Deref for BroadcasterInterface {
        type Target = Self;
        fn deref(&self) -> &Self {
                self
@@ -149,12 +151,12 @@ pub struct FeeEstimator {
        pub this_arg: *mut c_void,
        /// Gets estimated satoshis of fee required per 1000 Weight-Units.
        ///
-       /// Must be no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later round-downs
-       /// don't put us below 1 satoshi-per-byte).
+       /// Must return a value no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later
+       /// round-downs don't put us below 1 satoshi-per-byte).
        ///
-       /// This translates to:
-       ///  * satoshis-per-byte * 250
-       ///  * ceil(satoshis-per-kbyte / 4)
+       /// This method can be implemented with the following unit conversions:
+       ///  * max(satoshis-per-byte * 250, 253)
+       ///  * max(satoshis-per-kbyte / 4, 253)
        #[must_use]
        pub get_est_sat_per_1000_weight: extern "C" fn (this_arg: *const c_void, confirmation_target: crate::lightning::chain::chaininterface::ConfirmationTarget) -> u32,
        /// Frees any resources associated with this object given its this_arg pointer.
@@ -182,7 +184,7 @@ impl rustFeeEstimator for FeeEstimator {
 
 // We're essentially a pointer already, or at least a set of pointers, so allow us to be used
 // directly as a Deref trait in higher-level structs:
-impl std::ops::Deref for FeeEstimator {
+impl core::ops::Deref for FeeEstimator {
        type Target = Self;
        fn deref(&self) -> &Self {
                self