Skip to content

Commit

Permalink
Removing unnecessary output in logs using Println (#921)
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Ruppert <{ID}+{username}@users.noreply.github.com>
  • Loading branch information
ToasterTheBrave and Tyler Ruppert authored Jul 17, 2023
1 parent 31cade7 commit 3a6535d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions x/scheduler/client/cli/tx_create_job.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cli

import (
"fmt"
"io/ioutil"
"strconv"

Expand Down Expand Up @@ -59,7 +58,6 @@ func CmdCreateJob() *cobra.Command {
Creator: clientCtx.GetFromAddress().String(),
Job: job,
}
fmt.Printf("[MsgCreateJob][cmdCreateJob][msg] UNPACK ARGS: %+v\n", msg)
if err := msg.ValidateBasic(); err != nil {
return err
}
Expand Down
2 changes: 0 additions & 2 deletions x/scheduler/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ func (k Keeper) jobsStore(ctx sdk.Context) sdk.KVStore {
}

func (k Keeper) AddNewJob(ctx sdk.Context, job *types.Job) (sdk.AccAddress, error) {
fmt.Printf("[MsgCreateJob][AddNewJob][job] UNPACK ARGS: %+v\n", job)
if k.JobIDExists(ctx, job.GetID()) {
return nil, types.ErrJobWithIDAlreadyExists.Wrap(job.GetID())
}
Expand Down Expand Up @@ -124,7 +123,6 @@ func (k Keeper) AddNewJob(ctx sdk.Context, job *types.Job) (sdk.AccAddress, erro
}

func (k Keeper) saveJob(ctx sdk.Context, job *types.Job) error {
fmt.Printf("[MsgCreateJob][saveJob][job] UNPACK ARGS: %+v\n", job)
if job.GetOwner().Empty() {
return types.ErrInvalid.Wrap("owner can't be empty when adding a new job")
}
Expand Down
2 changes: 0 additions & 2 deletions x/scheduler/keeper/msg_server_create_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package keeper

import (
"context"
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/palomachain/paloma/x/scheduler/types"
Expand All @@ -12,7 +11,6 @@ func (k msgServer) CreateJob(goCtx context.Context, msg *types.MsgCreateJob) (*t
ctx := sdk.UnwrapSDKContext(goCtx)

var err error
fmt.Printf("[MsgCreateJob][CreateJob][msg] UNPACK ARGS: %+v\n", msg)
job := msg.Job
job.Owner, err = sdk.AccAddressFromBech32(msg.GetCreator())
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions x/scheduler/types/job.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package types

import (
"fmt"
"strings"
)

Expand All @@ -12,7 +11,6 @@ const JobIDMaxLen = 32
const JobAddressLength = 32

func (j *Job) ValidateBasic() error {
fmt.Printf("[MsgCreateJob][ValidateBasic][job] UNPACK ARGS: %+v\n", j)
if len(j.ID) == 0 {
return ErrInvalid.Wrap("job id can't be empty")
}
Expand Down
3 changes: 0 additions & 3 deletions x/scheduler/types/message_create_job.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package types

import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
Expand Down Expand Up @@ -39,7 +37,6 @@ func (msg *MsgCreateJob) GetSignBytes() []byte {
}

func (msg *MsgCreateJob) ValidateBasic() error {
fmt.Printf("[MsgCreateJob][ValidateBasic][msg] UNPACK ARGS: %+v\n", msg)
_, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err)
Expand Down

0 comments on commit 3a6535d

Please sign in to comment.