Skip to content

Commit

Permalink
rhp4: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Sep 13, 2024
1 parent c36795c commit 1ac1b5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rhp/v4/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func (s *Server) handleRPCFormContract(stream net.Conn) error {
tip := s.chain.Tip()
// validate the request
if err := rhp4.ValidateFormContractParams(settings, tip, req.Contract); err != nil {
return errorBadRequest(err.Error())
return rhp4.NewRPCError(rhp4.ErrorCodeBadRequest, err.Error())
}

formationTxn := types.V2Transaction{
Expand Down Expand Up @@ -618,7 +618,7 @@ func (s *Server) handleRPCRenewContract(stream net.Conn) error {
tip := s.chain.Tip()
// validate the request
if err := rhp4.ValidateRenewContractParams(settings, tip, req.Renewal); err != nil {
return errorBadRequest(err.Error())
return rhp4.NewRPCError(rhp4.ErrorCodeBadRequest, err.Error())
}

// lock the contract
Expand Down

0 comments on commit 1ac1b5c

Please sign in to comment.