@@ -248,13 +248,11 @@ pub trait CustomOnionMessageHandler {
248
248
249
249
/// A processed incoming onion message, containing either a Forward (another onion message)
250
250
/// or a Receive payload with decrypted contents.
251
- pub enum PeeledOnion < CMH : Deref > where
252
- CMH :: Target : CustomOnionMessageHandler ,
253
- {
251
+ pub enum PeeledOnion < CM : CustomOnionMessageContents > {
254
252
/// Forwarded onion, with the next node id and a new onion
255
253
Forward ( PublicKey , msgs:: OnionMessage ) ,
256
254
/// Received onion message, with decrypted contents, path_id, and reply path
257
- Receive ( OnionMessageContents < << CMH as Deref > :: Target as CustomOnionMessageHandler > :: CustomMessage > , Option < [ u8 ; 32 ] > , Option < BlindedPath > )
255
+ Receive ( OnionMessageContents < CM > , Option < [ u8 ; 32 ] > , Option < BlindedPath > )
258
256
}
259
257
260
258
/// Create an onion message with contents `message` to the destination of `path`.
@@ -319,7 +317,7 @@ where
319
317
pub fn peel_onion < NS : Deref , L : Deref , CMH : Deref > (
320
318
node_signer : NS , secp_ctx : & Secp256k1 < secp256k1:: All > , logger : L , custom_handler : CMH ,
321
319
msg : & msgs:: OnionMessage ,
322
- ) -> Result < PeeledOnion < CMH > , ( ) >
320
+ ) -> Result < PeeledOnion < << CMH > :: Target as CustomOnionMessageHandler > :: CustomMessage > , ( ) >
323
321
where
324
322
NS :: Target : NodeSigner ,
325
323
L :: Target : Logger ,
0 commit comments