Add more details to error log (#5637)

This commit is contained in:
Michael Vines 2019-08-26 19:51:17 -07:00 committed by GitHub
parent 3d098d2ed9
commit 99a97b7008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -764,7 +764,7 @@ pub fn fund_keys(client: &dyn Client, source: &Keypair, dests: &[Arc<Keypair>],
retries += 1; retries += 1;
debug!(" Retry {:?}", retries); debug!(" Retry {:?}", retries);
if retries >= 10 { if retries >= 10 {
error!(" Too many retries, give up"); error!("fund_keys: Too many retries ({}), give up", retries);
exit(1); exit(1);
} }
} }
@ -843,7 +843,10 @@ pub fn create_token_accounts(client: &dyn Client, signers: &[Arc<Keypair>], acco
retries += 1; retries += 1;
debug!(" Retry {:?}", retries); debug!(" Retry {:?}", retries);
if retries >= 20 { if retries >= 20 {
error!(" Too many retries, give up"); error!(
"create_token_accounts: Too many retries ({}), give up",
retries
);
exit(1); exit(1);
} }
} }
@ -953,7 +956,7 @@ pub fn airdrop_lamports(client: &dyn Client, drone_addr: &SocketAddr, id: &Keypa
debug!(" Retry..."); debug!(" Retry...");
tries += 1; tries += 1;
if tries > 50 { if tries > 50 {
error!("Too many retries, give up"); error!("airdrop_lamports: Too many retries ({}), give up", tries);
exit(1); exit(1);
} }
sleep(Duration::from_secs(2)); sleep(Duration::from_secs(2));