Skip to content

Commit 31b6b71

Browse files
committed
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.
1 parent 03d4eb5 commit 31b6b71

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lightning/src/blinded_path/message.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,12 @@ impl BlindedMessagePath {
142142
/// introduction node.
143143
///
144144
/// Will only modify `self` when returning `Ok`.
145-
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
145+
pub fn advance_path_by_one<NS: Deref, NL: Deref, T: secp256k1::Signing + secp256k1::Verification>(
146146
&mut self, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
147147
) -> Result<(), ()>
148148
where
149149
NS::Target: NodeSigner,
150150
NL::Target: NodeIdLookUp,
151-
T: secp256k1::Signing + secp256k1::Verification,
152151
{
153152
let control_tlvs_ss = node_signer.ecdh(Recipient::Node, &self.0.blinding_point, None)?;
154153
let rho = onion_utils::gen_rho_from_shared_secret(&control_tlvs_ss.secret_bytes());

lightning/src/blinded_path/payment.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,12 @@ impl BlindedPaymentPath {
157157
/// introduction node.
158158
///
159159
/// Will only modify `self` when returning `Ok`.
160-
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
160+
pub fn advance_path_by_one<NS: Deref, NL: Deref, T: secp256k1::Signing + secp256k1::Verification>(
161161
&mut self, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
162162
) -> Result<(), ()>
163163
where
164164
NS::Target: NodeSigner,
165165
NL::Target: NodeIdLookUp,
166-
T: secp256k1::Signing + secp256k1::Verification,
167166
{
168167
let control_tlvs_ss = node_signer.ecdh(Recipient::Node, &self.inner_path.blinding_point, None)?;
169168
let rho = onion_utils::gen_rho_from_shared_secret(&control_tlvs_ss.secret_bytes());

0 commit comments

Comments
 (0)