Skip to content

Commit

Permalink
fix: fix slice init length (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjingcun authored Oct 25, 2024
1 parent 3aa121c commit 699f5ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store/mysql/store_log_big_contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (bcls *bigContractLogStore) migrate(contract *Contract, partition bnPartiti

aidb := dbTx.Table(aiTableName).Where("cid = ?", contract.ID)
res := aidb.FindInBatches(&aiLogs, defaultBatchSizeLogInsert, func(tx *gorm.DB, batch int) error {
deleteIds := make([]uint64, len(aiLogs))
deleteIds := make([]uint64, 0, len(aiLogs))
clLogs := make([]*contractLog, 0, len(aiLogs))

for _, aiLog := range aiLogs {
Expand Down

0 comments on commit 699f5ed

Please sign in to comment.