Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonfung-dydx committed Dec 13, 2023
1 parent bf406dc commit de4d94d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion protocol/indexer/off_chain_updates/off_chain_updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func CreateOrderRemoveMessage(
// removed with the resulting removal status of the removed order. It attempts to look up the removal
// reason using the given orderStatus & orderError. If the reason cannot be found, it logs an error
// and falls back to the defaultRemovalReason. If defaultRemovalReason is ...UNSPECIFIED, it panics.
// TODO()
// TODO(CLOB-1051) take in ctx, not logger
func CreateOrderRemoveMessageWithDefaultReason(
logger log.Logger,
orderId clobtypes.OrderId,
Expand Down
2 changes: 2 additions & 0 deletions protocol/lib/log/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

// InfoLog reports msg as an info level log with key vals.
func InfoLog(ctx sdk.Context, msg string, keyvals ...interface{}) {
ctx.Logger().Info(msg, keyvals...)
}

// DebugLog reports msg as a debug level log with key vals.
func DebugLog(ctx sdk.Context, msg string, keyvals ...interface{}) {
ctx.Logger().Debug(msg, keyvals...)
}
Expand Down
3 changes: 1 addition & 2 deletions protocol/x/clob/keeper/orders.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/cometbft/cometbft/crypto/tmhash"
"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/iavl/internal/logger"
"github.com/dydxprotocol/v4-chain/protocol/indexer/msgsender"
"github.com/dydxprotocol/v4-chain/protocol/indexer/off_chain_updates"
indexershared "github.com/dydxprotocol/v4-chain/protocol/indexer/shared"
Expand Down Expand Up @@ -460,7 +459,7 @@ func (k Keeper) PlaceStatefulOrdersFromLastBlock(
)

if err != nil {
logger.Debug(ctx,
log.DebugLog(ctx,
fmt.Sprintf(
"MustPlaceStatefulOrdersFromLastBlock: PlaceOrder() returned an error %+v for order %+v",
err,
Expand Down

0 comments on commit de4d94d

Please sign in to comment.