Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 9f0f30a

Browse files
committed
Always check transaction statuses before resending
1 parent 8a35d88 commit 9f0f30a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

token/cli/src/rpc_client_utils.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub fn send_and_confirm_messages_with_spinner<T: Signers>(
9191
}
9292

9393
let mut last_resend = Instant::now() - transaction_resend_interval;
94-
loop {
94+
while block_height <= last_valid_block_height {
9595
let num_transactions = pending_transactions.len();
9696

9797
// Periodically re-send all pending transactions
@@ -140,10 +140,6 @@ pub fn send_and_confirm_messages_with_spinner<T: Signers>(
140140
}
141141
block_height = new_block_height;
142142

143-
if new_block_height > last_valid_block_height {
144-
break;
145-
}
146-
147143
// Collect statuses for the transactions, drop those that are confirmed
148144
let pending_signatures = pending_transactions.keys().cloned().collect::<Vec<_>>();
149145
for pending_signatures_chunk in

0 commit comments

Comments
 (0)