@@ -89,8 +89,8 @@ macro_rules! build_keys_helper {
89
89
90
90
#[ inline]
91
91
pub ( crate ) fn construct_keys_callback < ' a , T , I , F > (
92
- secp_ctx : & Secp256k1 < T > , unblinded_path : I , destination : Option < Destination > ,
93
- session_priv : & SecretKey , mut callback : F
92
+ secp_ctx : & Secp256k1 < T > , unblinded_path : I , destination : Destination , session_priv : & SecretKey ,
93
+ mut callback : F ,
94
94
) -> Result < ( ) , secp256k1:: Error >
95
95
where
96
96
T : secp256k1:: Signing + secp256k1:: Verification ,
@@ -102,17 +102,15 @@ where
102
102
for pk in unblinded_path {
103
103
build_keys_in_loop ! ( pk, false , None ) ;
104
104
}
105
- if let Some ( dest) = destination {
106
- match dest {
107
- Destination :: Node ( pk) => {
108
- build_keys ! ( pk, false , None ) ;
109
- } ,
110
- Destination :: BlindedPath ( BlindedMessagePath ( BlindedPath { blinded_hops, .. } ) ) => {
111
- for hop in blinded_hops {
112
- build_keys_in_loop ! ( hop. blinded_node_id, true , Some ( hop. encrypted_payload) ) ;
113
- }
114
- } ,
115
- }
105
+ match destination {
106
+ Destination :: Node ( pk) => {
107
+ build_keys ! ( pk, false , None ) ;
108
+ } ,
109
+ Destination :: BlindedPath ( BlindedMessagePath ( BlindedPath { blinded_hops, .. } ) ) => {
110
+ for hop in blinded_hops {
111
+ build_keys_in_loop ! ( hop. blinded_node_id, true , Some ( hop. encrypted_payload) ) ;
112
+ }
113
+ } ,
116
114
}
117
115
Ok ( ( ) )
118
116
}
0 commit comments