Skip to content

Commit

Permalink
fix the way operator sockets are printed in operatorsinfo srvc (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf authored May 28, 2024
1 parent b2bcaf1 commit 54fce96
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion services/operatorsinfo/operatorsinfo_inmemory.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,12 @@ func (ops *OperatorsInfoServiceInMemory) queryPastRegisteredOperatorEventsAndFil
return utils.WrapError(errors.New("error querying existing registered operator sockets"), socketsErr)
}
ops.logger.Debug("List of queried operator registration events in blsApkRegistry", "alreadyRegisteredOperatorAddr", alreadyRegisteredOperatorAddrs, "alreadyRegisteredOperatorPubkeys", alreadyRegisteredOperatorPubkeys, "service", "OperatorPubkeysServiceInMemory")
ops.logger.Debug("List of queried operator socket registration events", "socketsMap", socketsMap, "service", "OperatorPubkeysServiceInMemory")
for operatorId, socket := range socketsMap {
// we print each socket info on a separate line because slog for some reason doesn't pass map keys via their LogValue() function,
// so operatorId (of custom type Bytes32) prints as a byte array instead of its hex representation from LogValue()
// passing the Bytes32 directly to an slog log statements does call LogValue() and prints the hex representation
ops.logger.Debug("operator socket returned from registration events query", "operatorId", operatorId, "socket", socket, "service", "OperatorPubkeysServiceInMemory")
}

// Fill the pubkeydict db with the operators and pubkeys found
for i, operatorAddr := range alreadyRegisteredOperatorAddrs {
Expand Down

0 comments on commit 54fce96

Please sign in to comment.