Skip to content

Commit 593d2e9

Browse files
f simplify next_pub result
1 parent 362ddab commit 593d2e9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lightning/src/ln/onion_utils.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ pub(super) fn next_hop_packet_pubkey<T: secp256k1::Signing + secp256k1::Verifica
8282
Sha256::from_engine(sha).into_inner()
8383
};
8484

85-
if let Err(e) = packet_pubkey.mul_assign(secp_ctx, &blinding_factor[..]) {
86-
Err(e)
87-
} else {
88-
Ok(packet_pubkey)
89-
}
85+
packet_pubkey.mul_assign(secp_ctx, &blinding_factor[..]).map(|_| packet_pubkey)
9086
}
9187

9288
// can only fail if an intermediary hop has an invalid public key or session_priv is invalid

0 commit comments

Comments
 (0)