Skip to content

Commit

Permalink
Only override private BLS key in test mode if TestPrivateBlsFlag is d…
Browse files Browse the repository at this point in the history
…efined
  • Loading branch information
pschork committed Feb 7, 2025
1 parent 3db790b commit 3c532bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion node/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func NewConfig(ctx *cli.Context) (*Config, error) {
TLSCertFilePath: ctx.GlobalString(flags.BLSSignerCertFileFlag.Name),
CerberusAPIKey: blsSignerAPIKey,
}
} else {
} else if testMode && ctx.GlobalString(flags.TestPrivateBlsFlag.Name) != "" {
privateBls := ctx.GlobalString(flags.TestPrivateBlsFlag.Name)
blsSignerConfig = blssignerTypes.SignerConfig{
SignerType: blssignerTypes.PrivateKey,
Expand Down
2 changes: 2 additions & 0 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func NewNode(
var blockStaleMeasure, storeDurationBlocks uint32
if config.EnableTestMode && config.OverrideBlockStaleMeasure > 0 {
blockStaleMeasure = uint32(config.OverrideBlockStaleMeasure)
logger.Info("Test Mode Override!", "blockStaleMeasure", blockStaleMeasure)
} else {
staleMeasure, err := tx.GetBlockStaleMeasure(context.Background())
if err != nil {
Expand All @@ -167,6 +168,7 @@ func NewNode(
}
if config.EnableTestMode && config.OverrideStoreDurationBlocks > 0 {
storeDurationBlocks = uint32(config.OverrideStoreDurationBlocks)
logger.Info("Test Mode Override!", "storeDurationBlocks", storeDurationBlocks)
} else {
storeDuration, err := tx.GetStoreDurationBlocks(context.Background())
if err != nil {
Expand Down

0 comments on commit 3c532bf

Please sign in to comment.