瀏覽代碼

fix: err != nil

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

+ 1 - 1
internal/ethapi/api.go

@@ -1032,7 +1032,7 @@ func (s *PublicBlockChainAPI) BatchCall(ctx context.Context, config BatchCallCon
 		//	return nil, err
 		//}
 		// If the result contains a revert reason, try to unpack it.
-		if err != nil && len(result.Revert()) > 0 {
+		if err == nil && len(result.Revert()) > 0 {
 			result.Err = newRevertError(result)
 		} else {
 			result.Err = err