@@ -1605,15 +1605,15 @@ type bidFloorOpts struct {
1605
1605
payload * common.BuilderSubmitBlockRequest
1606
1606
}
1607
1607
1608
- func (api * RelayAPI ) checkFloorBidValue (opts bidFloorOpts ) (* big.Int , * logrus. Entry , bool ) {
1608
+ func (api * RelayAPI ) checkFloorBidValue (opts bidFloorOpts ) (* big.Int , bool ) {
1609
1609
// Reject new submissions once the payload for this slot was delivered - TODO: store in memory as well
1610
1610
slotLastPayloadDelivered , err := api .redis .GetLastSlotDelivered (context .Background (), opts .tx )
1611
1611
if err != nil && ! errors .Is (err , redis .Nil ) {
1612
1612
opts .log .WithError (err ).Error ("failed to get delivered payload slot from redis" )
1613
1613
} else if opts .payload .Slot () <= slotLastPayloadDelivered {
1614
1614
opts .log .Info ("rejecting submission because payload for this slot was already delivered" )
1615
1615
api .RespondError (opts .w , http .StatusBadRequest , "payload for this slot was already delivered" )
1616
- return nil , nil , false
1616
+ return nil , false
1617
1617
}
1618
1618
1619
1619
// Grab floor bid value
@@ -1636,17 +1636,17 @@ func (api *RelayAPI) checkFloorBidValue(opts bidFloorOpts) (*big.Int, *logrus.En
1636
1636
if err != nil {
1637
1637
opts .log .WithError (err ).Error ("failed processing cancellable bid below floor" )
1638
1638
api .RespondError (opts .w , http .StatusInternalServerError , "failed processing cancellable bid below floor" )
1639
- return nil , nil , false
1639
+ return nil , false
1640
1640
}
1641
1641
api .Respond (opts .w , http .StatusAccepted , "accepted bid below floor, skipped validation" )
1642
- return nil , nil , false
1642
+ return nil , false
1643
1643
} else if ! opts .cancellationsEnabled && isBidAtOrBelowFloor { // without cancellations: if at or below floor -> ignore
1644
1644
opts .simResultC <- & blockSimResult {false , false , nil , nil }
1645
1645
opts .log .Info ("submission at or below floor bid value, without cancellation" )
1646
1646
api .RespondMsg (opts .w , http .StatusAccepted , "accepted bid below floor, skipped validation" )
1647
- return nil , nil , false
1647
+ return nil , false
1648
1648
}
1649
- return floorBidValue , opts . log , true
1649
+ return floorBidValue , true
1650
1650
}
1651
1651
1652
1652
type redisUpdateBidOpts struct {
@@ -1874,7 +1874,7 @@ func (api *RelayAPI) handleSubmitNewBlock(w http.ResponseWriter, req *http.Reque
1874
1874
simResultC : simResultC ,
1875
1875
payload : payload ,
1876
1876
}
1877
- floorBidValue , log , ok := api .checkFloorBidValue (bfOpts )
1877
+ floorBidValue , ok := api .checkFloorBidValue (bfOpts )
1878
1878
if ! ok {
1879
1879
return
1880
1880
}
0 commit comments