Regenerate auto-generated bindings
[ldk-c-bindings] / lightning-c-bindings / src / lightning / chain / chaininterface.rs
index 9b8e84b105e22e160ebe75a1bb5bec63aa82bbbc..e6494e26bac7c55fdd7ed911f8204ee3ab788351 100644 (file)
@@ -12,6 +12,7 @@
 //! 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 bitcoin::hashes::Hash;
 use crate::c_types::*;
@@ -28,14 +29,13 @@ pub struct BroadcasterInterface {
        /// 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 Sync for BroadcasterInterface {}
 unsafe impl Send for BroadcasterInterface {}
+unsafe impl Sync for BroadcasterInterface {}
 
 use lightning::chain::chaininterface::BroadcasterInterface as rustBroadcasterInterface;
 impl rustBroadcasterInterface for BroadcasterInterface {
-       fn broadcast_transaction(&self, tx: &bitcoin::blockdata::transaction::Transaction) {
-               let mut local_tx = ::bitcoin::consensus::encode::serialize(tx);
-               (self.broadcast_transaction)(self.this_arg, crate::c_types::Transaction::from_vec(local_tx))
+       fn broadcast_transaction(&self, mut tx: &bitcoin::blockdata::transaction::Transaction) {
+               (self.broadcast_transaction)(self.this_arg, crate::c_types::Transaction::from_bitcoin(tx))
        }
 }
 
@@ -134,12 +134,12 @@ pub struct FeeEstimator {
        /// 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 Sync for FeeEstimator {}
 unsafe impl Send for FeeEstimator {}
+unsafe impl Sync for FeeEstimator {}
 
 use lightning::chain::chaininterface::FeeEstimator as rustFeeEstimator;
 impl rustFeeEstimator for FeeEstimator {
-       fn get_est_sat_per_1000_weight(&self, confirmation_target: lightning::chain::chaininterface::ConfirmationTarget) -> u32 {
+       fn get_est_sat_per_1000_weight(&self, mut confirmation_target: lightning::chain::chaininterface::ConfirmationTarget) -> u32 {
                let mut ret = (self.get_est_sat_per_1000_weight)(self.this_arg, crate::lightning::chain::chaininterface::ConfirmationTarget::native_into(confirmation_target));
                ret
        }