From 6e03922b9ae5b58644b3a7b856f3a3c052812292 Mon Sep 17 00:00:00 2001 From: defi-dev <69192116+defi-dev@users.noreply.github.com> Date: Tue, 2 Jul 2024 18:57:54 +0800 Subject: [PATCH] handle offchain resolver's max execution time (#114) --- app/Network.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Network.ts b/app/Network.ts index 367cd2d..7b03072 100644 --- a/app/Network.ts +++ b/app/Network.ts @@ -651,6 +651,10 @@ export class Network { jobsToExecute += 1; } catch (e) { this.clog('error', `method: getOffchainResolveCalldata, jobKey: ${jobKey}, error message: ${e.message}`); + if (e.message.includes('Max execution time')) { + agent.addJobToBlacklist(jobKey, e.message); + this.unregisterResolver(jobKey); + } } delete this.offchainResolverPending[jobKey]; } else {