Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing unnecessary output in logs using Println #921

Merged
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
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