From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Mon, 3 Sep 2018 20:51:32 +0000 (-0400) Subject: Merge pull request #144 from yuntai/onion_call_back_simple X-Git-Tag: v0.0.12~332 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=199246431650edb4282748131289fff4ac5d20ce;hp=c91c4be6c56cd8182c378eacbc0f6edb0eb46a13;p=rust-lightning Merge pull request #144 from yuntai/onion_call_back_simple Remove code fragments with no effect --- diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index 6a0e55a2..b1d81695 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))));