From: Yuntai Kyong Date: Sun, 2 Sep 2018 12:45:44 +0000 (+0900) Subject: Remove code fragments with no effect X-Git-Tag: v0.0.12~332^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=92274c8800d26f5dd77fefd3d75f2360089be70a;p=rust-lightning Remove code fragments with no effect --- diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index 6a0e55a2c..b1d81695b 100644 --- a/src/ln/channelmanager.rs +++ b/src/ln/channelmanager.rs @@ -478,7 +478,6 @@ impl ChannelManager { fn construct_onion_keys_callback (secp_ctx: &Secp256k1, route: &Route, session_priv: &SecretKey, mut callback: FType) -> Result<(), HandleError> { let mut blinded_priv = session_priv.clone(); let mut blinded_pub = PublicKey::from_secret_key(secp_ctx, &blinded_priv); - let mut first_iteration = true; for hop in route.hops.iter() { let shared_secret = SharedSecret::new(secp_ctx, &hop.pubkey, &blinded_priv); @@ -489,10 +488,6 @@ impl ChannelManager { let mut blinding_factor = [0u8; 32]; sha.result(&mut blinding_factor); - if first_iteration { - blinded_pub = PublicKey::from_secret_key(secp_ctx, &blinded_priv); - first_iteration = false; - } let ephemeral_pubkey = blinded_pub; secp_call!(blinded_priv.mul_assign(secp_ctx, &secp_call!(SecretKey::from_slice(secp_ctx, &blinding_factor))));