Add wait before checking confirm again

Otherwise we can quickly check that we
have no signature 4 times in a row.
This commit is contained in:
Stephen Akridge 2018-11-29 14:08:26 -08:00 committed by sakridge
parent ecc87ab1aa
commit 9684737de7
1 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,8 @@ use std::io::Write;
use std::net::{Ipv4Addr, SocketAddr};
use std::path::Path;
use std::str::FromStr;
use std::thread::sleep;
use std::time::Duration;
use std::{error, fmt, mem};
use system_transaction::SystemTransaction;
use thin_client::poll_gossip_for_leader;
@ -745,6 +747,7 @@ fn send_and_confirm_tx(
} else {
break status;
}
sleep(Duration::from_secs(1));
};
match status {
RpcSignatureStatus::AccountInUse => {