From 94bba204886289e0c251018845e966b487af5b31 Mon Sep 17 00:00:00 2001 From: Dean Ancajas Date: Tue, 30 Jan 2018 14:44:08 -0500 Subject: [PATCH] Added INFO when reconnecting to wallet (#662) --- wallet/src/client.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wallet/src/client.rs b/wallet/src/client.rs index b60e23257..7401663b5 100644 --- a/wallet/src/client.rs +++ b/wallet/src/client.rs @@ -30,15 +30,21 @@ use util::LOGGER; /// Call the wallet API to create a coinbase output for the given block_fees. /// Will retry based on default "retry forever with backoff" behavior. pub fn create_coinbase(url: &str, block_fees: &BlockFees) -> Result { + let mut has_error = false; + retry_backoff_forever(|| { let res = single_create_coinbase(&url, &block_fees); if let Err(_) = res { + has_error = true; error!( LOGGER, "Failed to get coinbase from {}. Run grin wallet listen", url ); } + if has_error { + error!(LOGGER, "Successfully received coinbase from {}", url); + } res }) }