]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Use inline bounds for secp contexts, rather than `where` clauses
authorMatt Corallo <git@bluematt.me>
Mon, 26 Aug 2024 18:31:24 +0000 (18:31 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 14 Oct 2024 19:15:11 +0000 (19:15 +0000)
The bindings really should support this, but currently they don't
and its late enough in the release cycle I don't want to try to fix
that.

lightning/src/blinded_path/message.rs
lightning/src/blinded_path/payment.rs

index 0651877750c732591ec994e79c08def1acdb365e..e4aed2a547cce447b638cc1486b2f4b355a56994 100644 (file)
@@ -142,13 +142,12 @@ impl BlindedMessagePath {
        /// introduction node.
        ///
        /// Will only modify `self` when returning `Ok`.
-       pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
+       pub fn advance_path_by_one<NS: Deref, NL: Deref, T: secp256k1::Signing + secp256k1::Verification>(
                &mut self, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
        ) -> Result<(), ()>
        where
                NS::Target: NodeSigner,
                NL::Target: NodeIdLookUp,
-               T: secp256k1::Signing + secp256k1::Verification,
        {
                let control_tlvs_ss = node_signer.ecdh(Recipient::Node, &self.0.blinding_point, None)?;
                let rho = onion_utils::gen_rho_from_shared_secret(&control_tlvs_ss.secret_bytes());
index 320547962ce9ed98d87146bad62955e1cbd007ad..c84e5926a92299b3c8aa5b77719a169406b86ce5 100644 (file)
@@ -157,13 +157,12 @@ impl BlindedPaymentPath {
        /// introduction node.
        ///
        /// Will only modify `self` when returning `Ok`.
-       pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
+       pub fn advance_path_by_one<NS: Deref, NL: Deref, T: secp256k1::Signing + secp256k1::Verification>(
                &mut self, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
        ) -> Result<(), ()>
        where
                NS::Target: NodeSigner,
                NL::Target: NodeIdLookUp,
-               T: secp256k1::Signing + secp256k1::Verification,
        {
                let control_tlvs_ss = node_signer.ecdh(Recipient::Node, &self.inner_path.blinding_point, None)?;
                let rho = onion_utils::gen_rho_from_shared_secret(&control_tlvs_ss.secret_bytes());