|
|
@@ -1030,8 +1030,10 @@ 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})
|
|
|
- } else if len(result.Revert()) > 0 { // If the result contains a revert reason, try to unpack it.
|
|
|
- result.Err = newRevertError(result)
|
|
|
+ } else {
|
|
|
+ if len(result.Revert()) > 0 { // If the result contains a revert reason, try to unpack it.
|
|
|
+ result.Err = newRevertError(result)
|
|
|
+ }
|
|
|
|
|
|
results = append(results, CallResult{Return: result.Return(), Error: result.Err})
|
|
|
}
|