From 38a2b38f30b1d10543241d54de43c033e8b119c1 Mon Sep 17 00:00:00 2001 From: urnotsam Date: Fri, 19 Apr 2024 08:30:13 -0400 Subject: [PATCH] Retry if failed to forward tx injection --- src/api.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api.ts b/src/api.ts index d2beb1c7..5ee0a13d 100755 --- a/src/api.ts +++ b/src/api.ts @@ -483,6 +483,9 @@ async function injectWithRetries(txHash: string, tx: any, args: any, retries = c } else if (result.reason === 'Node not active. Rejecting inject.') { console.log('Injected to an inactive node. Retrying...') retryCount++ + } else if (result.reason === 'No validators found to forward the transaction') { + console.log('No validators found to forward the transaction. Retrying...') + retryCount++ } else { return result }