core: adjust TradeExpiryTime to 3 hour

This commit is contained in:
c9s 2023-12-12 18:18:59 +08:00
parent 8025d05eac
commit 97c39921bd
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -9,7 +9,7 @@ import (
"github.com/c9s/bbgo/pkg/types"
)
const TradeExpiryTime = 24 * time.Hour
const TradeExpiryTime = 3 * time.Hour
const PruneTriggerNumOfTrades = 10_000
type TradeStore struct {
@ -115,7 +115,7 @@ func (s *TradeStore) touchLastTradeTime(trade types.Trade) {
}
// Prune prunes trades that are older than the expiry time
// see TradeExpiryTime (24 hours)
// see TradeExpiryTime (3 hours)
func (s *TradeStore) Prune(curTime time.Time) {
s.Lock()
defer s.Unlock()