mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 00:05:15 +00:00
core: add comment to the remove condition
This commit is contained in:
parent
86360a7595
commit
15b179a47d
|
@ -147,6 +147,7 @@ func (s *OrderStore) Prune(expiryDuration time.Duration) {
|
||||||
defer s.mu.Unlock()
|
defer s.mu.Unlock()
|
||||||
|
|
||||||
for idx, o := range s.orders {
|
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.Status == types.OrderStatusCanceled || o.Status == types.OrderStatusFilled {
|
||||||
if o.UpdateTime.Time().Before(cutOffTime) {
|
if o.UpdateTime.Time().Before(cutOffTime) {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user