소스 검색

尝试修复err问题

skyfffire 2 년 전
부모
커밋
ffbe9922be
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      internal/ethapi/api.go

+ 5 - 3
internal/ethapi/api.go

@@ -1027,16 +1027,18 @@ func (s *PublicBlockChainAPI) BatchCall(ctx context.Context, config BatchCallCon
 		if call.BlockOverrides != nil {
 			call.BlockOverrides.Apply(&blockContext)
 		}
-		result, err := doCall(ctx, s.b, call.CallArgs, state, header, timeout, gp, &blockContext)
+		result, _ := doCall(ctx, s.b, call.CallArgs, state, header, timeout, gp, &blockContext)
 		//if err != nil {
 		//	return nil, err
 		//}
 		// If the result contains a revert reason, try to unpack it.
 		if len(result.Revert()) > 0 {
 			result.Err = newRevertError(result)
-		} else {
-			result.Err = err
 		}
+		
+		//else {
+		//	result.Err = err
+		//}
 
 		results = append(results, CallResult{Return: result.Return(), Error: result.Err})
 	}