X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning-c-bindings%2Fsrc%2Flightning%2Fln%2Fchan_utils.rs;h=c1a23fd70922a65fe07b35dd608b28c028800d64;hb=4870c930fc07067830277754bb6e42d7abd6e77f;hp=bb8a1390de6d3783daa3f4111277a415baccaee7;hpb=792f94eff769b4ae55bb78a5e0c6cc099f28ef6c;p=ldk-c-bindings diff --git a/lightning-c-bindings/src/lightning/ln/chan_utils.rs b/lightning-c-bindings/src/lightning/ln/chan_utils.rs index bb8a139..c1a23fd 100644 --- a/lightning-c-bindings/src/lightning/ln/chan_utils.rs +++ b/lightning-c-bindings/src/lightning/ln/chan_utils.rs @@ -851,7 +851,7 @@ pub extern "C" fn HTLCOutputInCommitment_get_payment_hash(this_ptr: &HTLCOutputI /// The hash of the preimage which unlocks this HTLC. #[no_mangle] pub extern "C" fn HTLCOutputInCommitment_set_payment_hash(this_ptr: &mut HTLCOutputInCommitment, mut val: crate::c_types::ThirtyTwoBytes) { - unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.payment_hash = ::lightning::ln::PaymentHash(val.data); + unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.payment_hash = ::lightning::ln::types::PaymentHash(val.data); } /// The position within the commitment transactions' outputs. This may be None if the value is /// below the dust limit (in which case no output appears in the commitment transaction and the @@ -879,7 +879,7 @@ pub extern "C" fn HTLCOutputInCommitment_new(mut offered_arg: bool, mut amount_m offered: offered_arg, amount_msat: amount_msat_arg, cltv_expiry: cltv_expiry_arg, - payment_hash: ::lightning::ln::PaymentHash(payment_hash_arg.data), + payment_hash: ::lightning::ln::types::PaymentHash(payment_hash_arg.data), transaction_output_index: local_transaction_output_index_arg, }), is_owned: true } } @@ -962,7 +962,7 @@ pub extern "C" fn build_htlc_transaction(commitment_txid: *const [u8; 32], mut f /// Returns the witness required to satisfy and spend a HTLC input. #[no_mangle] pub extern "C" fn build_htlc_input_witness(mut local_sig: crate::c_types::ECDSASignature, mut remote_sig: crate::c_types::ECDSASignature, mut preimage: crate::c_types::derived::COption_ThirtyTwoBytesZ, mut redeem_script: crate::c_types::u8slice, channel_type_features: &crate::lightning::ln::features::ChannelTypeFeatures) -> crate::c_types::Witness { - let mut local_preimage = { /*preimage*/ let preimage_opt = preimage; if preimage_opt.is_none() { None } else { Some({ { ::lightning::ln::PaymentPreimage({ preimage_opt.take() }.data) }})} }; + let mut local_preimage = { /*preimage*/ let preimage_opt = preimage; if preimage_opt.is_none() { None } else { Some({ { ::lightning::ln::types::PaymentPreimage({ preimage_opt.take() }.data) }})} }; let mut ret = lightning::ln::chan_utils::build_htlc_input_witness(&local_sig.into_rust(), &remote_sig.into_rust(), &local_preimage, ::bitcoin::blockdata::script::Script::from_bytes(redeem_script.to_slice()), channel_type_features.get_native_ref()); crate::c_types::Witness::from_bitcoin(&ret) } @@ -1378,7 +1378,7 @@ pub extern "C" fn ChannelTransactionParameters_read(ser: crate::c_types::u8slice } use lightning::ln::chan_utils::DirectedChannelTransactionParameters as nativeDirectedChannelTransactionParametersImport; -pub(crate) type nativeDirectedChannelTransactionParameters = nativeDirectedChannelTransactionParametersImport<'static>; +pub(crate) type nativeDirectedChannelTransactionParameters = nativeDirectedChannelTransactionParametersImport<'static, >; /// Static channel fields used to build transactions given per-commitment fields, organized by /// broadcaster/countersignatory. @@ -1924,7 +1924,7 @@ pub extern "C" fn ClosingTransaction_to_counterparty_script(this_arg: &crate::li use lightning::ln::chan_utils::TrustedClosingTransaction as nativeTrustedClosingTransactionImport; -pub(crate) type nativeTrustedClosingTransaction = nativeTrustedClosingTransactionImport<'static>; +pub(crate) type nativeTrustedClosingTransaction = nativeTrustedClosingTransactionImport<'static, >; /// A wrapper on ClosingTransaction indicating that the built bitcoin /// transaction is trusted. @@ -2168,7 +2168,7 @@ pub extern "C" fn CommitmentTransaction_verify(this_arg: &crate::lightning::ln:: use lightning::ln::chan_utils::TrustedCommitmentTransaction as nativeTrustedCommitmentTransactionImport; -pub(crate) type nativeTrustedCommitmentTransaction = nativeTrustedCommitmentTransactionImport<'static>; +pub(crate) type nativeTrustedCommitmentTransaction = nativeTrustedCommitmentTransactionImport<'static, >; /// A wrapper on CommitmentTransaction indicating that the derived fields (the built bitcoin /// transaction and the transaction creation keys) are trusted.