Added INFO when reconnecting to wallet (#662)

This commit is contained in:
Dean Ancajas 2018-01-30 14:44:08 -05:00 committed by Ignotus Peverell
parent 6647823177
commit 94bba20488

View file

@ -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<CbData, Error> {
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
})
}