From 634ce6180be77e82fbd439c97e15cee72cbff2c4 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 6 Dec 2021 13:31:47 +0800 Subject: [PATCH] avoid using panic when order cancel failed --- pkg/backtest/matching.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/backtest/matching.go b/pkg/backtest/matching.go index 780ead91d..997f27454 100644 --- a/pkg/backtest/matching.go +++ b/pkg/backtest/matching.go @@ -6,11 +6,9 @@ import ( "sync/atomic" "time" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "github.com/c9s/bbgo/pkg/fixedpoint" "github.com/c9s/bbgo/pkg/types" + "github.com/pkg/errors" ) // DefaultFeeRate set the fee rate for most cases @@ -88,8 +86,6 @@ func (m *SimplePriceMatching) CancelOrder(o types.Order) (types.Order, error) { } if !found { - logrus.Panicf("cancel order failed, order %d not found: %+v", o.OrderID, o) - return o, fmt.Errorf("cancel order failed, order %d not found: %+v", o.OrderID, o) }