From 25adf46e212bdd700498aeb3844b339767a91345 Mon Sep 17 00:00:00 2001 From: avalonche Date: Fri, 12 Jan 2024 07:20:58 +1100 Subject: [PATCH] address pr comments --- server/service.go | 12 ++++++------ server/utils.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/service.go b/server/service.go index 29234cfc..9efc4a87 100644 --- a/server/service.go +++ b/server/service.go @@ -652,11 +652,11 @@ func (m *BoostService) processCapellaPayload(w http.ResponseWriter, req *http.Re } func (m *BoostService) processDenebPayload(w http.ResponseWriter, req *http.Request, log *logrus.Entry, blindedBlock *eth2ApiV1Deneb.SignedBlindedBeaconBlock) { - // Get the slotUID for this slot - slotUID := "" + // Get the currentSlotUID for this slot + currentSlotUID := "" m.slotUIDLock.Lock() if m.slotUID.slot == uint64(blindedBlock.Message.Slot) { - slotUID = m.slotUID.uid.String() + currentSlotUID = m.slotUID.uid.String() } else { log.Warnf("latest slotUID is for slot %d rather than payload slot %d", m.slotUID.slot, blindedBlock.Message.Slot) } @@ -669,7 +669,7 @@ func (m *BoostService) processDenebPayload(w http.ResponseWriter, req *http.Requ "slot": blindedBlock.Message.Slot, "blockHash": blindedBlock.Message.Body.ExecutionPayloadHeader.BlockHash.String(), "parentHash": blindedBlock.Message.Body.ExecutionPayloadHeader.ParentHash.String(), - "slotUID": slotUID, + "slotUID": currentSlotUID, }) // Log how late into the slot the request starts @@ -693,7 +693,7 @@ func (m *BoostService) processDenebPayload(w http.ResponseWriter, req *http.Requ } // Add request headers - headers := map[string]string{HeaderKeySlotUID: slotUID} + headers := map[string]string{HeaderKeySlotUID: currentSlotUID} // Prepare for requests var wg sync.WaitGroup @@ -734,7 +734,7 @@ func (m *BoostService) processDenebPayload(w http.ResponseWriter, req *http.Requ // Ensure the response blockhash matches the request if blindedBlock.Message.Body.ExecutionPayloadHeader.BlockHash != payload.BlockHash { log.WithFields(logrus.Fields{ - "responseBlockHash": responsePayload.Capella.BlockHash.String(), + "responseBlockHash": payload.BlockHash.String(), }).Error("requestBlockHash does not equal responseBlockHash") return } diff --git a/server/utils.go b/server/utils.go index a59ab5c3..fb779d53 100644 --- a/server/utils.go +++ b/server/utils.go @@ -262,7 +262,7 @@ func getPayloadResponseIsEmpty(payload *builderApi.VersionedSubmitBlindedBlockRe case spec.DataVersionDeneb: if payload.Deneb == nil || payload.Deneb.ExecutionPayload == nil || payload.Deneb.ExecutionPayload.BlockHash == nilHash || - payload.Deneb.BlobsBundle == nil || payload.Deneb.BlobsBundle.Blobs == nil { + payload.Deneb.BlobsBundle == nil { return true } case spec.DataVersionUnknown, spec.DataVersionPhase0, spec.DataVersionAltair, spec.DataVersionBellatrix: