FIX: [grid2] group id should be bound by MaxInt32

This commit is contained in:
gx578007 2023-03-07 11:54:45 +08:00
parent 4e6614e711
commit f8054459c4

View File

@ -1642,7 +1642,7 @@ func (s *Strategy) Run(ctx context.Context, _ bbgo.OrderExecutor, session *bbgo.
}
if s.OrderGroupID == 0 {
s.OrderGroupID = util.FNV32(instanceID)
s.OrderGroupID = util.FNV32(instanceID) % math.MaxInt32
}
if s.AutoRange != nil {
@ -1869,4 +1869,4 @@ func roundUpMarketQuantity(market types.Market, v fixedpoint.Value, c string) (f
}
return v.Round(prec, fixedpoint.Up), prec
}
}