From 15b179a47daecb94381bbab9748a4ba65f9612c6 Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 22 Oct 2024 11:59:02 +0800 Subject: [PATCH] core: add comment to the remove condition --- pkg/core/orderstore.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/core/orderstore.go b/pkg/core/orderstore.go index 7ba228248..bcbd055de 100644 --- a/pkg/core/orderstore.go +++ b/pkg/core/orderstore.go @@ -147,6 +147,7 @@ func (s *OrderStore) Prune(expiryDuration time.Duration) { defer s.mu.Unlock() for idx, o := range s.orders { + // if the order is canceled or filled, we should remove the order if the update time is before the cut off time if o.Status == types.OrderStatusCanceled || o.Status == types.OrderStatusFilled { if o.UpdateTime.Time().Before(cutOffTime) { continue