Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bridge-history-api/internal/logic/history_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func (h *HistoryLogic) getCachedTxsInfo(ctx context.Context, cacheKey string, pa
}

if start >= total {
return nil, 0, false, nil
return nil, 0, true, nil
Comment thread
georgehao marked this conversation as resolved.
}

values, err := h.redis.ZRevRange(ctx, cacheKey, start, end).Result()
Expand Down
3 changes: 2 additions & 1 deletion common/database/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func InitDB(config *Config) (*gorm.DB, error) {
}

db, err := gorm.Open(postgres.Open(config.DSN), &gorm.Config{
Logger: &tmpGormLogger,
CreateBatchSize: 1000,
Logger: &tmpGormLogger,
NowFunc: func() time.Time {
// why set time to UTC.
// if now set this, the inserted data time will use local timezone. like 2023-07-18 18:24:00 CST+8
Expand Down
Loading