mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 11:31:08 +03:00
Added INFO when reconnecting to wallet (#662)
This commit is contained in:
parent
6647823177
commit
94bba20488
1 changed files with 6 additions and 0 deletions
|
@ -30,15 +30,21 @@ use util::LOGGER;
|
||||||
/// Call the wallet API to create a coinbase output for the given block_fees.
|
/// Call the wallet API to create a coinbase output for the given block_fees.
|
||||||
/// Will retry based on default "retry forever with backoff" behavior.
|
/// Will retry based on default "retry forever with backoff" behavior.
|
||||||
pub fn create_coinbase(url: &str, block_fees: &BlockFees) -> Result<CbData, Error> {
|
pub fn create_coinbase(url: &str, block_fees: &BlockFees) -> Result<CbData, Error> {
|
||||||
|
let mut has_error = false;
|
||||||
|
|
||||||
retry_backoff_forever(|| {
|
retry_backoff_forever(|| {
|
||||||
let res = single_create_coinbase(&url, &block_fees);
|
let res = single_create_coinbase(&url, &block_fees);
|
||||||
if let Err(_) = res {
|
if let Err(_) = res {
|
||||||
|
has_error = true;
|
||||||
error!(
|
error!(
|
||||||
LOGGER,
|
LOGGER,
|
||||||
"Failed to get coinbase from {}. Run grin wallet listen",
|
"Failed to get coinbase from {}. Run grin wallet listen",
|
||||||
url
|
url
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if has_error {
|
||||||
|
error!(LOGGER, "Successfully received coinbase from {}", url);
|
||||||
|
}
|
||||||
res
|
res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue