mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
core: adjust TradeExpiryTime to 3 hour
This commit is contained in:
parent
8025d05eac
commit
97c39921bd
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/c9s/bbgo/pkg/types"
|
"github.com/c9s/bbgo/pkg/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
const TradeExpiryTime = 24 * time.Hour
|
const TradeExpiryTime = 3 * time.Hour
|
||||||
const PruneTriggerNumOfTrades = 10_000
|
const PruneTriggerNumOfTrades = 10_000
|
||||||
|
|
||||||
type TradeStore struct {
|
type TradeStore struct {
|
||||||
|
@ -115,7 +115,7 @@ func (s *TradeStore) touchLastTradeTime(trade types.Trade) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prune prunes trades that are older than the expiry time
|
// 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) {
|
func (s *TradeStore) Prune(curTime time.Time) {
|
||||||
s.Lock()
|
s.Lock()
|
||||||
defer s.Unlock()
|
defer s.Unlock()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user