From 5ba78d69676ddb4db876ddaae873969e482b3885 Mon Sep 17 00:00:00 2001 From: parazyd Date: Sat, 30 Apr 2022 10:13:19 +0200 Subject: [PATCH] node/state: Reduce scope of pubkey variable in apply(). --- src/node/state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/state.rs b/src/node/state.rs index 8c7c07482..2fa760b8d 100644 --- a/src/node/state.rs +++ b/src/node/state.rs @@ -160,9 +160,9 @@ impl State { wallet.put_own_coin(own_coin).await?; - let pubkey = PublicKey::from_secret(*secret); - debug!(target: "state_apply", "Send a notification"); if let Some(ch) = notify.clone() { + debug!(target: "state_apply", "Send a notification"); + let pubkey = PublicKey::from_secret(*secret); ch.send((pubkey, note.value)).await?; } }