From c85a315866ed0282993544e127ed7c61193332ae Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 26 Aug 2024 18:31:24 +0000 Subject: [PATCH] Use inline bounds for secp contexts, rather than `where` clauses 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 | 3 +-- lightning/src/blinded_path/payment.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lightning/src/blinded_path/message.rs b/lightning/src/blinded_path/message.rs index 065187775..e4aed2a54 100644 --- a/lightning/src/blinded_path/message.rs +++ b/lightning/src/blinded_path/message.rs @@ -142,13 +142,12 @@ impl BlindedMessagePath { /// introduction node. /// /// Will only modify `self` when returning `Ok`. - pub fn advance_path_by_one( + pub fn advance_path_by_one( &mut self, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1 ) -> 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()); diff --git a/lightning/src/blinded_path/payment.rs b/lightning/src/blinded_path/payment.rs index 320547962..c84e5926a 100644 --- a/lightning/src/blinded_path/payment.rs +++ b/lightning/src/blinded_path/payment.rs @@ -157,13 +157,12 @@ impl BlindedPaymentPath { /// introduction node. /// /// Will only modify `self` when returning `Ok`. - pub fn advance_path_by_one( + pub fn advance_path_by_one( &mut self, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1 ) -> 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()); -- 2.39.5