xgap: fix group id range

This commit is contained in:
c9s 2023-06-20 17:18:15 +08:00
parent 0d2afef276
commit d4cf39430e
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -210,7 +210,7 @@ func (s *Strategy) CrossRun(ctx context.Context, _ bbgo.OrderExecutionRouter, se
s.tradingSession.UserDataStream.OnTradeUpdate(s.handleTradeUpdate)
instanceID := fmt.Sprintf("%s-%s", ID, s.Symbol)
s.groupID = util.FNV32(instanceID)
s.groupID = util.FNV32(instanceID) % math.MaxInt32
log.Infof("using group id %d from fnv32(%s)", s.groupID, instanceID)
go func() {