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:
parent
ecc87ab1aa
commit
9684737de7
|
@ -22,6 +22,8 @@ use std::io::Write;
|
||||||
use std::net::{Ipv4Addr, SocketAddr};
|
use std::net::{Ipv4Addr, SocketAddr};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
use std::thread::sleep;
|
||||||
|
use std::time::Duration;
|
||||||
use std::{error, fmt, mem};
|
use std::{error, fmt, mem};
|
||||||
use system_transaction::SystemTransaction;
|
use system_transaction::SystemTransaction;
|
||||||
use thin_client::poll_gossip_for_leader;
|
use thin_client::poll_gossip_for_leader;
|
||||||
|
@ -745,6 +747,7 @@ fn send_and_confirm_tx(
|
||||||
} else {
|
} else {
|
||||||
break status;
|
break status;
|
||||||
}
|
}
|
||||||
|
sleep(Duration::from_secs(1));
|
||||||
};
|
};
|
||||||
match status {
|
match status {
|
||||||
RpcSignatureStatus::AccountInUse => {
|
RpcSignatureStatus::AccountInUse => {
|
||||||
|
|
Loading…
Reference in New Issue