Skip to content

Commit 1992464

Browse files
authored
Merge pull request #144 from yuntai/onion_call_back_simple
Remove code fragments with no effect
2 parents c91c4be + 92274c8 commit 1992464

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/ln/channelmanager.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ impl ChannelManager {
478478
fn construct_onion_keys_callback<T: secp256k1::Signing, FType: FnMut(SharedSecret, [u8; 32], PublicKey, &RouteHop)> (secp_ctx: &Secp256k1<T>, route: &Route, session_priv: &SecretKey, mut callback: FType) -> Result<(), HandleError> {
479479
let mut blinded_priv = session_priv.clone();
480480
let mut blinded_pub = PublicKey::from_secret_key(secp_ctx, &blinded_priv);
481-
let mut first_iteration = true;
482481

483482
for hop in route.hops.iter() {
484483
let shared_secret = SharedSecret::new(secp_ctx, &hop.pubkey, &blinded_priv);
@@ -489,10 +488,6 @@ impl ChannelManager {
489488
let mut blinding_factor = [0u8; 32];
490489
sha.result(&mut blinding_factor);
491490

492-
if first_iteration {
493-
blinded_pub = PublicKey::from_secret_key(secp_ctx, &blinded_priv);
494-
first_iteration = false;
495-
}
496491
let ephemeral_pubkey = blinded_pub;
497492

498493
secp_call!(blinded_priv.mul_assign(secp_ctx, &secp_call!(SecretKey::from_slice(secp_ctx, &blinding_factor))));

0 commit comments

Comments
 (0)