X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Flightning%2Fchain%2Fchaininterface.rs;h=17cff8bb34ad124795820988422695697a41c876;hp=99e3956c278bd265395a1ebd94288b847e978c6f;hb=9e34ca7e68bc8caca0b76f29efbac903ce5b9d2b;hpb=c0af862562cc201eba7e31535833569b0fab4e3c diff --git a/lightning-c-bindings/src/lightning/chain/chaininterface.rs b/lightning-c-bindings/src/lightning/chain/chaininterface.rs index 99e3956..17cff8b 100644 --- a/lightning-c-bindings/src/lightning/chain/chaininterface.rs +++ b/lightning-c-bindings/src/lightning/chain/chaininterface.rs @@ -29,12 +29,10 @@ 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, } -unsafe impl Sync for BroadcasterInterface {} -unsafe impl Send for BroadcasterInterface {} use lightning::chain::chaininterface::BroadcasterInterface as rustBroadcasterInterface; impl rustBroadcasterInterface for BroadcasterInterface { - fn broadcast_transaction(&self, tx: &bitcoin::blockdata::transaction::Transaction) { + 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 +132,10 @@ 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, } -unsafe impl Sync for FeeEstimator {} -unsafe impl Send 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 }