Skip to content

Commit 7f1febe

Browse files
committed
add validatorPubKeyResultVar to check_consensus_validator_status
1 parent 44cef81 commit 7f1febe

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

pkg/coordinator/tasks/check_consensus_validator_status/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ type Config struct {
77
ValidatorStatus []string `yaml:"validatorStatus" json:"validatorStatus"`
88
FailOnCheckMiss bool `yaml:"failOnCheckMiss" json:"failOnCheckMiss"`
99

10-
ValidatorInfoResultVar string `yaml:"validatorInfoResultVar" json:"validatorInfoResultVar"`
10+
ValidatorInfoResultVar string `yaml:"validatorInfoResultVar" json:"validatorInfoResultVar"`
11+
ValidatorPubKeyResultVar string `yaml:"validatorPubKeyResultVar" json:"validatorPubKeyResultVar"`
1112
}
1213

1314
func DefaultConfig() Config {

pkg/coordinator/tasks/check_consensus_validator_status/task.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ func (t *Task) runValidatorStatusCheck() bool {
192192
}
193193
}
194194

195+
if t.config.ValidatorPubKeyResultVar != "" {
196+
t.ctx.Vars.SetVar(t.config.ValidatorPubKeyResultVar, fmt.Sprintf("0x%x", validator.Validator.PublicKey[:]))
197+
}
198+
195199
if len(t.config.ValidatorStatus) > 0 {
196200
found := false
197201

0 commit comments

Comments
 (0)