Skip to content

Commit 033960e

Browse files
authored
fix: forester do not retry failing tx (#1724)
* fix: forester do not retry failing tx * cleanup
1 parent c097da9 commit 033960e

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

sdk-libs/client/src/rpc/rpc_connection.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ use light_compressed_account::indexer_event::event::{
66
BatchPublicTransactionEvent, PublicTransactionEvent,
77
};
88
use solana_client::rpc_config::RpcSendTransactionConfig;
9-
use solana_program::{
10-
clock::Slot,
11-
instruction::{Instruction, InstructionError},
12-
};
9+
use solana_program::{clock::Slot, instruction::Instruction};
1310
use solana_sdk::{
1411
account::{Account, AccountSharedData},
1512
commitment_config::CommitmentConfig,
@@ -33,11 +30,8 @@ pub trait RpcConnection: Send + Sync + Debug + 'static {
3330

3431
fn should_retry(&self, error: &RpcError) -> bool {
3532
match error {
36-
RpcError::TransactionError(TransactionError::InstructionError(
37-
_,
38-
InstructionError::Custom(6004),
39-
)) => {
40-
// Don't retry ForesterNotEligible error
33+
RpcError::TransactionError(TransactionError::InstructionError(_, _)) => {
34+
// Don't retry failing transactions.
4135
false
4236
}
4337
_ => true,

0 commit comments

Comments
 (0)