Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
adding logging + reverse retries modification
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthDesai committed Aug 26, 2019
1 parent b8922ce commit 602f051
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions client/src/thin_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ impl ThinClient {
serialize_into(&mut wr, &transaction)
.expect("serialize Transaction in pub fn transfer_signed");
// resend the same transaction until the transaction has no chance of succeeding
error!("Tries: {}", x);
while now.elapsed().as_secs() < wait_time as u64 {
error!("wait time: {}", wait_time);
if num_confirmed == 0 {
// Send the transaction if there has been no confirmation (e.g. the first time)
self.transactions_socket
Expand Down
2 changes: 1 addition & 1 deletion local_cluster/src/cluster_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn spend_and_verify_all_nodes<S: ::std::hash::BuildHasher>(
system_transaction::transfer(&funding_keypair, &random_keypair.pubkey(), 1, blockhash);
let confs = VOTE_THRESHOLD_DEPTH + 1;
let sig = client
.retry_transfer_until_confirmed(&funding_keypair, &mut transaction, 10, confs)
.retry_transfer_until_confirmed(&funding_keypair, &mut transaction, 5, confs)
.unwrap();
for validator in &cluster_nodes {
if ignore_nodes.contains(&validator.id) {
Expand Down

0 comments on commit 602f051

Please sign in to comment.