Merge pull request #2661 from TheBlueMatt/2023-10-dup-claim-chan-hang
[rust-lightning] / lightning / src / blinded_path / mod.rs
index 896999799fbebed4456f8c53768881698d4e581f..1415836c01fee6cacaa8d2808f28d6d9ecfba37a 100644 (file)
@@ -57,7 +57,7 @@ pub struct BlindedHop {
 
 impl BlindedPath {
        /// Create a one-hop blinded path for a message.
-       pub fn one_hop_for_message<ES: EntropySource, T: secp256k1::Signing + secp256k1::Verification>(
+       pub fn one_hop_for_message<ES: EntropySource + ?Sized, T: secp256k1::Signing + secp256k1::Verification>(
                recipient_node_id: PublicKey, entropy_source: &ES, secp_ctx: &Secp256k1<T>
        ) -> Result<Self, ()> {
                Self::new_for_message(&[recipient_node_id], entropy_source, secp_ctx)
@@ -68,7 +68,7 @@ impl BlindedPath {
        ///
        /// Errors if no hops are provided or if `node_pk`(s) are invalid.
        //  TODO: make all payloads the same size with padding + add dummy hops
-       pub fn new_for_message<ES: EntropySource, T: secp256k1::Signing + secp256k1::Verification>(
+       pub fn new_for_message<ES: EntropySource + ?Sized, T: secp256k1::Signing + secp256k1::Verification>(
                node_pks: &[PublicKey], entropy_source: &ES, secp_ctx: &Secp256k1<T>
        ) -> Result<Self, ()> {
                if node_pks.is_empty() { return Err(()) }