فهرست منبع

既然有错误为什么返不回去?

skyfffire 2 سال پیش
والد
کامیت
804556325c
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      internal/ethapi/api.go

+ 1 - 2
internal/ethapi/api.go

@@ -1029,9 +1029,8 @@ func (s *PublicBlockChainAPI) BatchCall(ctx context.Context, config BatchCallCon
 			call.BlockOverrides.Apply(&blockContext)
 		}
 		result, err := doCall(ctx, s.b, call.CallArgs, state, header, timeout, gp, &blockContext)
-		fmt.Fprintf(os.Stderr, "------call execution reverted: %v", err)
-
 		if err != nil {
+			fmt.Fprintf(os.Stderr, "call execution reverted: %v\n\n", err)
 			results = append(results, CallResult{Return: nil, Error: err})
 		} else {
 			// If the result contains a revert reason, try to unpack it.