skyfffire 2 年之前
父节点
当前提交
a93fdb0d6d
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      internal/ethapi/api.go

+ 6 - 2
internal/ethapi/api.go

@@ -1029,9 +1029,13 @@ 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: err})
+			results = append(results, CallResult{Return: nil, Error: &revertError{
+				error:  err,
+				reason: "410err",
+			}})
 		} else {
-			if len(result.Revert()) > 0 { // If the result contains a revert reason, try to unpack it.
+			// If the result contains a revert reason, try to unpack it.
+			if len(result.Revert()) > 0 {
 				result.Err = newRevertError(result)
 			}