Skip to content

Commit

Permalink
fix printing of measurements in validator
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf committed Mar 20, 2024
1 parent dd698e2 commit 7bb91c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion joinservice/internal/watcher/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ func (u *Updatable) Update() error {
if err != nil {
return fmt.Errorf("unmarshaling config: %w", err)
}
u.log.Debug(fmt.Sprintf("New expected measurements: 0x%s", hex.encodeToString(cfg.GetMeasurements())))
measurementsToPrint := ""
for i, measurement := range cfg.GetMeasurements() {
measurementsToPrint += fmt.Sprintf("\t%d: 0x%s\n", i, hex.EncodeToString(measurement.Expected))
}
u.log.Debug(fmt.Sprintf("New expected measurements: 0x%s", measurementsToPrint))

cfgWithCerts, err := u.configWithCerts(cfg)
if err != nil {
Expand Down

0 comments on commit 7bb91c7

Please sign in to comment.