Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions tools/preconf-rpc/sender/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,7 @@ func (t *TxSender) sendBid(
) (bidResult, error) {
timeToOptIn, err := t.bidder.Estimate()
if err != nil {
t.logger.Error("Failed to estimate time to opt-in", "error", err)
if !errors.Is(err, optinbidder.ErrNoSlotInCurrentEpoch) && !errors.Is(err, optinbidder.ErrNoEpochInfo) {
return bidResult{}, err
}
t.logger.Warn("Failed to estimate time to opt-in", "error", err)
// If we cannot estimate the time to opt-in, we assume a default value and
// proceed with the bid process. The default value should be higher than
// the typical block time to ensure we consider the next slot as a non-opt-in slot.
Expand Down Expand Up @@ -439,7 +436,7 @@ func (t *TxSender) sendBid(
big.NewInt(0),
strings.TrimPrefix(txn.Raw, "0x"),
&optinbidder.BidOpts{
WaitForOptIn: optedInSlot,
WaitForOptIn: false,
BlockNumber: uint64(price.BlockNumber),
},
)
Expand Down Expand Up @@ -479,12 +476,8 @@ BID_LOOP:
}
}
}
if len(result.commitments) == 0 {
t.logger.Error("Bid completed with no commitments")
return bidResult{}, fmt.Errorf("bid completed with no commitments")
}
t.logger.Info(
"Bid successful with commitments",
"Bid operation complete",
"noOfProviders", result.noOfProviders,
"noOfCommitments", len(result.commitments),
"blockNumber", result.blockNumber,
Expand Down
2 changes: 1 addition & 1 deletion tools/preconf-rpc/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func New(config *Config) (*Service, error) {
handlers.RegisterMethods(rpcServer)

mux := http.NewServeMux()
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("GET /health", func(w http.ResponseWriter, r *http.Request) {
if err := healthChecker.Health(); err != nil {
http.Error(w, err.Error(), http.StatusServiceUnavailable)
return
Expand Down
Loading