Skip to content

Commit 8afcef0

Browse files
committed
remove unused function
1 parent 65252bf commit 8afcef0

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

pkg/rewards/rewards.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -396,25 +396,6 @@ func (rc *RewardsCalculator) findGeneratedRewardSnapshotByBlock(blockHeight uint
396396
return &generatedRewardSnapshots, nil
397397
}
398398

399-
func (rc *RewardsCalculator) findRewardsTablesBySnapshotDate(snapshotDate string) ([]string, error) {
400-
schemaName := rc.globalConfig.DatabaseConfig.SchemaName
401-
if schemaName == "" {
402-
schemaName = "public"
403-
}
404-
snakeCaseSnapshotDate := strings.ReplaceAll(snapshotDate, "-", "_")
405-
var rewardsTables []string
406-
query := `select table_name from information_schema.tables where table_schema = @tableSchema and table_name like @tableNamePattern`
407-
res := rc.grm.Raw(query,
408-
sql.Named("tableSchema", schemaName),
409-
sql.Named("tableNamePattern", fmt.Sprintf("gold_%%%s", snakeCaseSnapshotDate)),
410-
).Scan(&rewardsTables)
411-
if res.Error != nil {
412-
rc.logger.Sugar().Errorw("Failed to get rewards tables", "error", res.Error)
413-
return nil, res.Error
414-
}
415-
return rewardsTables, nil
416-
}
417-
418399
func (rc *RewardsCalculator) DeleteCorruptedRewardsFromBlockHeight(blockHeight uint64) error {
419400
generatedSnapshot, err := rc.findGeneratedRewardSnapshotByBlock(blockHeight)
420401
if err != nil {

0 commit comments

Comments
 (0)