瀏覽代碼

打印错误,再次尝试

skyfffire 2 年之前
父節點
當前提交
35649baefe
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      internal/ethapi/api.go

+ 3 - 4
internal/ethapi/api.go

@@ -1029,10 +1029,9 @@ func (s *PublicBlockChainAPI) BatchCall(ctx context.Context, config BatchCallCon
 		}
 		result, err := doCall(ctx, s.b, call.CallArgs, state, header, timeout, gp, &blockContext)
 		if err != nil {
-			results = append(results, CallResult{Return: nil, Error: &revertError{
-				error:  err,
-				reason: "410err",
-			}})
+			fmt.Sprintf("410 execution reverted: %v", err.Error())
+
+			results = append(results, CallResult{Return: nil, Error: err})
 		} else {
 			// If the result contains a revert reason, try to unpack it.
 			if len(result.Revert()) > 0 {