Skip to content

Commit

Permalink
feat(service): log where payload was found
Browse files Browse the repository at this point in the history
  • Loading branch information
alextes committed Sep 13, 2024
1 parent a7c98b3 commit 052153f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions services/api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,7 @@ func (api *RelayAPI) checkProposerSignature(block *common.VersionedSignedBlinded
func getPayloadWithFallbacks(log *logrus.Entry, datastoreRef *datastore.Datastore, slot uint64, proposerPubkey common.PubkeyHex, blockHash phase0.Hash32) (*builderApi.VersionedSubmitBlindedBlockResponse, error) {
getPayloadResp, err := datastoreRef.LocalPayloadContents(uint64(slot), proposerPubkey.String(), blockHash.String())
if getPayloadResp != nil {
log.Info("payload found locally")
return getPayloadResp, nil
}

Expand All @@ -1294,6 +1295,7 @@ func getPayloadWithFallbacks(log *logrus.Entry, datastoreRef *datastore.Datastor
// Check there.
getPayloadResp, err = datastoreRef.RedisPayload(log, uint64(slot), proposerPubkey.String(), blockHash.String())
if getPayloadResp != nil {
log.Info("payload found in redis")
return getPayloadResp, nil
}

Expand All @@ -1310,6 +1312,7 @@ func getPayloadWithFallbacks(log *logrus.Entry, datastoreRef *datastore.Datastor
// Regardless, its possible the other geo does. Check it, so we may help out in publishing, even if it wasn't "our bid".
getPayloadResp, err = datastoreRef.RemotePayloadContents(uint64(slot), proposerPubkey.String(), blockHash.String())
if getPayloadResp != nil {
log.Info("payload found remotely")
return getPayloadResp, nil
}

Expand Down

0 comments on commit 052153f

Please sign in to comment.