From 4195c1c0d3dfbc01ca857b712aa0b35400c1de60 Mon Sep 17 00:00:00 2001 From: brion Date: Thu, 5 Jan 2023 16:58:52 +0800 Subject: [PATCH] update --- internal/ethapi/api_multicall.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/ethapi/api_multicall.go b/internal/ethapi/api_multicall.go index 6032d8c60e..0c4b46652f 100644 --- a/internal/ethapi/api_multicall.go +++ b/internal/ethapi/api_multicall.go @@ -60,6 +60,11 @@ const ( errMessageExecuting = -40012 errEVMCancelled = -40013 errEVMReverted = -40014 + errEVMFastFailed = -40015 + + // internal error + errUnderlyingDB = -40020 + errLoadingState = -40021 ) var ( @@ -253,7 +258,12 @@ func doOneCall(ctx context.Context, b Backend, state *state.StateDB, header *typ // If the timer caused an abort, return an appropriate error message if evm.Cancelled() { result.Code = errEVMCancelled - result.Err = fmt.Sprintf("execution cancelled, either fast failed or exceeding timeout(%v)", singleCallTimeout) + result.Err = fmt.Sprintf("execution cancelled, timeout(%v)", singleCallTimeout) + // if execution time is close to timeout, not proper + if time.Since(start) < singleCallTimeout { + result.Code = errEVMFastFailed + result.Err = "fast failed" + } return result, err }