File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff 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-
418399func (rc * RewardsCalculator ) DeleteCorruptedRewardsFromBlockHeight (blockHeight uint64 ) error {
419400 generatedSnapshot , err := rc .findGeneratedRewardSnapshotByBlock (blockHeight )
420401 if err != nil {
You can’t perform that action at this time.
0 commit comments