Skip to content

Remove code fragments with no effect #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/ln/channelmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ impl ChannelManager {
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> {
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);
Expand All @@ -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))));
Expand Down