implementing publishblockv2 for deneb (#12662)

fixing broken test (#12673)
This commit is contained in:
james-prysm
2023-07-26 11:46:49 -05:00
committed by Preston Van Loon
parent 6402301871
commit f602a44bee
10 changed files with 1954 additions and 502 deletions

View File

@@ -9,7 +9,10 @@ go_library(
],
importpath = "github.com/prysmaticlabs/prysm/v4/network/http",
visibility = ["//visibility:public"],
deps = ["@com_github_sirupsen_logrus//:go_default_library"],
deps = [
"//api:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
],
)
go_test(

View File

@@ -5,6 +5,8 @@ import (
"regexp"
"strconv"
"strings"
"github.com/prysmaticlabs/prysm/v4/api"
)
// match a number with optional decimals
@@ -21,7 +23,7 @@ func SszRequested(req *http.Request) (bool, error) {
for _, t := range types {
values := strings.Split(t, ";")
name := values[0]
if name != jsonMediaType && name != octetStreamMediaType {
if name != api.JsonMediaType && name != api.OctetStreamMediaType {
continue
}
// no params specified
@@ -47,5 +49,5 @@ func SszRequested(req *http.Request) (bool, error) {
}
}
return currentType == octetStreamMediaType, nil
return currentType == api.OctetStreamMediaType, nil
}