Skip to content

Commit

Permalink
add err logs
Browse files Browse the repository at this point in the history
  • Loading branch information
atvanguard committed Mar 18, 2024
1 parent 8eb660f commit 8944940
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/evm/orderbook/matching_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func (pipeline *MatchingPipeline) runLiquidations(liquidablePositions []Liquidab
}
requiredMargin, err := isExecutable(&order, fillAmount, minAllowableMargin, takerFee, liquidationBounds[market].Upperbound, marginMap[order.Trader])
if err != nil {
log.Error("order is not executable", "order", order, "err", err)
numOrdersExhausted++
continue
}
Expand Down Expand Up @@ -231,6 +232,7 @@ func (pipeline *MatchingPipeline) runLiquidations(liquidablePositions []Liquidab
}
requiredMargin, err := isExecutable(&order, fillAmount, minAllowableMargin, takerFee, liquidationBounds[market].Upperbound, marginMap[order.Trader])
if err != nil {
log.Error("order is not executable", "order", order, "err", err)
numOrdersExhausted++
continue
}
Expand Down Expand Up @@ -264,7 +266,7 @@ func (pipeline *MatchingPipeline) runMatchingEngine(lotp LimitOrderTxProcessor,
for j := 0; j < len(shortOrders); j++ {
fillAmount, err := areMatchingOrders(longOrders[i], shortOrders[j], marginMap, minAllowableMargin, takerFee, upperBound)
if err != nil {
log.Error("Error in areMatchingOrders", "longOrder", longOrders[i], "shortOrder", shortOrders[i], "err", err)
log.Error("orders not matcheable", "longOrder", longOrders[i], "shortOrder", shortOrders[i], "err", err)
continue
}
longOrders[i], shortOrders[j] = ExecuteMatchedOrders(lotp, longOrders[i], shortOrders[j], fillAmount)
Expand Down

0 comments on commit 8944940

Please sign in to comment.