From 01c1fc02621bc8fe5a5c18d71fc55885b52903a1 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Mon, 2 Dec 2019 14:53:27 -0800 Subject: [PATCH] Add logging --- lib/src/lightwallet.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/src/lightwallet.rs b/lib/src/lightwallet.rs index 7497257..4ff89de 100644 --- a/lib/src/lightwallet.rs +++ b/lib/src/lightwallet.rs @@ -887,8 +887,11 @@ impl LightWallet { }; match last_addresses.iter().position(|s| *s == *address) { - None => return, + None => { + return; + }, Some(pos) => { + info!("Adding {} new zaddrs", (GAP_RULE_UNUSED_ADDRESSES - pos)); // If it in the last unused, addresses, create that many more for _ in 0..(GAP_RULE_UNUSED_ADDRESSES - pos) { // If the wallet is locked, this is a no-op. That is fine, since we really @@ -909,8 +912,11 @@ impl LightWallet { }; match last_addresses.iter().position(|s| *s == *address) { - None => return, + None => { + return; + }, Some(pos) => { + info!("Adding {} new zaddrs", (GAP_RULE_UNUSED_ADDRESSES - pos)); // If it in the last unused, addresses, create that many more for _ in 0..(GAP_RULE_UNUSED_ADDRESSES - pos) { // If the wallet is locked, this is a no-op. That is fine, since we really