beacon/light/api: update log messages

This commit is contained in:
Felix Lange 2024-03-04 17:18:08 +01:00
parent 29dff1d611
commit d56f586ef3

View file

@ -67,18 +67,18 @@ func (s *ApiServer) SendRequest(id request.ID, req request.Request) {
var err error var err error
switch data := req.(type) { switch data := req.(type) {
case sync.ReqUpdates: case sync.ReqUpdates:
log.Debug("Requesting light client update", "reqid", id, "period", data.FirstPeriod, "count", data.Count) log.Debug("Beacon API: requesting light client update", "reqid", id, "period", data.FirstPeriod, "count", data.Count)
var r sync.RespUpdates var r sync.RespUpdates
r.Updates, r.Committees, err = s.api.GetBestUpdatesAndCommittees(data.FirstPeriod, data.Count) r.Updates, r.Committees, err = s.api.GetBestUpdatesAndCommittees(data.FirstPeriod, data.Count)
resp = r resp = r
case sync.ReqHeader: case sync.ReqHeader:
log.Debug("Requesting beacon header", "reqid", id, "hash", common.Hash(data)) log.Debug("Beacon API: requesting header", "reqid", id, "hash", common.Hash(data))
resp, err = s.api.GetHeader(common.Hash(data)) resp, err = s.api.GetHeader(common.Hash(data))
case sync.ReqCheckpointData: case sync.ReqCheckpointData:
log.Debug("Requesting beacon checkpoint data", "reqid", id, "hash", common.Hash(data)) log.Debug("Beacon API: requesting checkpoint data", "reqid", id, "hash", common.Hash(data))
resp, err = s.api.GetCheckpointData(common.Hash(data)) resp, err = s.api.GetCheckpointData(common.Hash(data))
case sync.ReqBeaconBlock: case sync.ReqBeaconBlock:
log.Debug("Requesting beacon block", "reqid", id, "hash", common.Hash(data)) log.Debug("Beacon API: requesting block", "reqid", id, "hash", common.Hash(data))
resp, err = s.api.GetBeaconBlock(common.Hash(data)) resp, err = s.api.GetBeaconBlock(common.Hash(data))
default: default:
} }