diff --git a/operators/churner/churner.go b/operators/churner/churner.go index 6dba72dac4..c83e39370f 100644 --- a/operators/churner/churner.go +++ b/operators/churner/churner.go @@ -21,7 +21,7 @@ import ( var ( bipMultiplier = big.NewInt(10000) - secondsTillExpiry = 90 * time.Second + secondsTillExpiry = 3600 * time.Second ) type ChurnRequest struct { @@ -285,7 +285,7 @@ func (c *churner) sign(ctx context.Context, operatorToRegisterAddress gethcommon var salt [32]byte copy(salt[:], saltKeccak256) - // set expiry to 90s in the future + // set expiry to 3600s in the future expiry := big.NewInt(now.Add(secondsTillExpiry).Unix()) // sign and return signature diff --git a/operators/churner/server.go b/operators/churner/server.go index 73820eef1a..dc8e26fc90 100644 --- a/operators/churner/server.go +++ b/operators/churner/server.go @@ -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) diff --git a/operators/churner/server_test.go b/operators/churner/server_test.go index 0c70108f49..00fb2ad851 100644 --- a/operators/churner/server_test.go +++ b/operators/churner/server_test.go @@ -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) {