Skip to content

Commit 8376ed4

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 8121ec2 commit 8376ed4

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
@@ -143,13 +143,12 @@ impl BlindedMessagePath {
143143
/// introduction node.
144144
///
145145
/// Will only modify `self` when returning `Ok`.
146-
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
146+
pub fn advance_path_by_one<NS: Deref, NL: Deref, T: secp256k1::Signing + secp256k1::Verification>(
147147
&mut self, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
148148
) -> Result<(), ()>
149149
where
150150
NS::Target: NodeSigner,
151151
NL::Target: NodeIdLookUp,
152-
T: secp256k1::Signing + secp256k1::Verification,
153152
{
154153
let control_tlvs_ss = node_signer.ecdh(Recipient::Node, &self.0.blinding_point, None)?;
155154
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
@@ -162,13 +162,12 @@ impl BlindedPaymentPath {
162162
/// introduction node.
163163
///
164164
/// Will only modify `self` when returning `Ok`.
165-
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
165+
pub fn advance_path_by_one<NS: Deref, NL: Deref, T: secp256k1::Signing + secp256k1::Verification>(
166166
&mut self, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
167167
) -> Result<(), ()>
168168
where
169169
NS::Target: NodeSigner,
170170
NL::Target: NodeIdLookUp,
171-
T: secp256k1::Signing + secp256k1::Verification,
172171
{
173172
let control_tlvs_ss = node_signer.ecdh(Recipient::Node, &self.inner_path.blinding_point, None)?;
174173
let rho = onion_utils::gen_rho_from_shared_secret(&control_tlvs_ss.secret_bytes());

0 commit comments

Comments
 (0)