Skip to content

Commit

Permalink
Merge branch 'Layr-Labs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
bxue-l2 authored Apr 15, 2024
2 parents e4c88ee + 60d2812 commit 9f1c3f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion operators/churner/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (s *Server) Churn(ctx context.Context, req *pb.ChurnRequest) (*pb.ChurnRepl
// Global rate limiting: check that we are after the previous approval's expiry
if now.Unix() < s.latestExpiry {
s.metrics.IncrementFailedRequestNum("Churn", FailReasonPrevApprovalNotExpired)
return nil, api.NewResourceExhaustedError(fmt.Sprintf("previous approval not expired, retry in %d", s.latestExpiry-now.Unix()))
return nil, api.NewResourceExhaustedError(fmt.Sprintf("previous approval not expired, retry in %d seconds", s.latestExpiry-now.Unix()))
}

request, err := createChurnRequest(req)
Expand Down
2 changes: 1 addition & 1 deletion operators/churner/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func TestChurn(t *testing.T) {
// retry prior to expiry should fail
_, err = s.Churn(ctx, request)
assert.NotNil(t, err)
assert.Equal(t, err.Error(), "rpc error: code = ResourceExhausted desc = previous approval not expired, retry in 90")
assert.Equal(t, err.Error(), "rpc error: code = ResourceExhausted desc = previous approval not expired, retry in 3600 seconds")
}

func TestChurnWithInvalidQuorum(t *testing.T) {
Expand Down

0 comments on commit 9f1c3f7

Please sign in to comment.