mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 04:54:05 -05:00
removing ssz-only flag ( reverting feature) and fix accept header middleware (#15433)
* removing ssz-only flag * gaz * reverting other uses of sszonly * gaz * adding kasey and radek's suggestions * update changelog * adding test * radek advice with new headers and tests * adding logs and fixing comments * adding logs and fixing comments * gaz * Update validator/client/beacon-api/rest_handler_client.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/apiutil/header.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/apiutil/header.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * radek's comments * adding another failing case based on radek's suggestion * another unit test --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
@@ -51,7 +51,6 @@ type Flags struct {
|
||||
EnableExperimentalAttestationPool bool // EnableExperimentalAttestationPool enables an experimental attestation pool design.
|
||||
DisableDutiesV2 bool // DisableDutiesV2 sets validator client to use the get Duties endpoint
|
||||
EnableWeb bool // EnableWeb enables the webui on the validator client
|
||||
SSZOnly bool // SSZOnly forces the validator client to use SSZ for communication with the beacon node when REST mode is enabled (useful for debugging)
|
||||
// Logging related toggles.
|
||||
DisableGRPCConnectionLogs bool // Disables logging when a new grpc client has connected.
|
||||
EnableFullSSZDataLogging bool // Enables logging for full ssz data on rejected gossip messages
|
||||
@@ -340,10 +339,6 @@ func ConfigureValidator(ctx *cli.Context) error {
|
||||
logEnabled(EnableWebFlag)
|
||||
cfg.EnableWeb = true
|
||||
}
|
||||
if ctx.Bool(SSZOnly.Name) {
|
||||
logEnabled(SSZOnly)
|
||||
cfg.SSZOnly = true
|
||||
}
|
||||
|
||||
cfg.KeystoreImportDebounceInterval = ctx.Duration(dynamicKeyReloadDebounceInterval.Name)
|
||||
Init(cfg)
|
||||
|
||||
@@ -197,12 +197,6 @@ var (
|
||||
Usage: "(Work in progress): Enables the web portal for the validator client.",
|
||||
Value: false,
|
||||
}
|
||||
|
||||
// SSZOnly forces the validator client to use SSZ for communication with the beacon node when REST mode is enabled
|
||||
SSZOnly = &cli.BoolFlag{
|
||||
Name: "ssz-only",
|
||||
Usage: "(debug): Forces the validator client to use SSZ for communication with the beacon node when REST mode is enabled",
|
||||
}
|
||||
)
|
||||
|
||||
// devModeFlags holds list of flags that are set when development mode is on.
|
||||
@@ -225,7 +219,6 @@ var ValidatorFlags = append(deprecatedFlags, []cli.Flag{
|
||||
EnableBeaconRESTApi,
|
||||
DisableDutiesV2,
|
||||
EnableWebFlag,
|
||||
SSZOnly,
|
||||
}...)
|
||||
|
||||
// E2EValidatorFlags contains a list of the validator feature flags to be tested in E2E.
|
||||
|
||||
@@ -4,6 +4,10 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
const (
|
||||
EnvNameOverrideAccept = "PRYSM_API_OVERRIDE_ACCEPT"
|
||||
)
|
||||
|
||||
// SetupTestConfigCleanup preserves configurations allowing to modify them within tests without any
|
||||
// restrictions, everything is restored after the test.
|
||||
func SetupTestConfigCleanup(t testing.TB) {
|
||||
|
||||
Reference in New Issue
Block a user