Skip to content

Commit

Permalink
fix: update a few things that were not caught as part of the rebase o…
Browse files Browse the repository at this point in the history
…f master
  • Loading branch information
seanmcgary committed Jan 16, 2025
1 parent b8462c9 commit 1e62fa8
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package defaultOperatorSplits
import (
"fmt"
"math/big"
"os"
"testing"
"time"

Expand All @@ -26,9 +27,10 @@ func setup() (
error,
) {
cfg := config.NewConfig()
cfg.Debug = os.Getenv(config.Debug) == "true"
cfg.DatabaseConfig = *tests.GetDbConfigFromEnv()

l, _ := logger.NewLogger(&logger.LoggerConfig{Debug: true})
l, _ := logger.NewLogger(&logger.LoggerConfig{Debug: cfg.Debug})

dbname, _, grm, err := postgres.GetTestPostgresDatabase(cfg.DatabaseConfig, cfg, l)
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion pkg/eigenState/operatorAVSSplits/operatorAVSSplits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package operatorAVSSplits
import (
"fmt"
"math/big"
"os"
"strings"
"testing"
"time"
Expand All @@ -27,9 +28,10 @@ func setup() (
error,
) {
cfg := config.NewConfig()
cfg.Debug = os.Getenv(config.Debug) == "true"
cfg.DatabaseConfig = *tests.GetDbConfigFromEnv()

l, _ := logger.NewLogger(&logger.LoggerConfig{Debug: true})
l, _ := logger.NewLogger(&logger.LoggerConfig{Debug: cfg.Debug})

dbname, _, grm, err := postgres.GetTestPostgresDatabase(cfg.DatabaseConfig, cfg, l)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package operatorDirectedRewardSubmissions
import (
"fmt"
"math/big"
"os"
"strings"
"testing"
"time"
Expand All @@ -27,9 +28,10 @@ func setup() (
error,
) {
cfg := config.NewConfig()
cfg.Debug = os.Getenv(config.Debug) == "true"
cfg.DatabaseConfig = *tests.GetDbConfigFromEnv()

l, _ := logger.NewLogger(&logger.LoggerConfig{Debug: true})
l, _ := logger.NewLogger(&logger.LoggerConfig{Debug: cfg.Debug})

dbname, _, grm, err := postgres.GetTestPostgresDatabase(cfg.DatabaseConfig, cfg, l)
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion pkg/eigenState/operatorPISplits/operatorPISplits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package operatorPISplits
import (
"fmt"
"math/big"
"os"
"strings"
"testing"
"time"
Expand All @@ -27,9 +28,10 @@ func setup() (
error,
) {
cfg := config.NewConfig()
cfg.Debug = os.Getenv(config.Debug) == "true"
cfg.DatabaseConfig = *tests.GetDbConfigFromEnv()

l, _ := logger.NewLogger(&logger.LoggerConfig{Debug: true})
l, _ := logger.NewLogger(&logger.LoggerConfig{Debug: cfg.Debug})

dbname, _, grm, err := postgres.GetTestPostgresDatabase(cfg.DatabaseConfig, cfg, l)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/rewards/rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ func (rc *RewardsCalculator) FindClaimableDistributionRoot(rootIndex int64) (*ty
order by sdr.root_index desc
limit 1
`
renderedQuery, err := rewardsUtils.RenderQueryTemplate(query, map[string]string{
renderedQuery, err := rewardsUtils.RenderQueryTemplate(query, map[string]interface{}{
"rootIndex": strconv.Itoa(int(rootIndex)),
})
if err != nil {
Expand Down Expand Up @@ -775,7 +775,7 @@ func (rc *RewardsCalculator) GetGeneratedRewardsForSnapshotDate(snapshotDate str
and grs.snapshot_date::timestamp(6) >= '{{.snapshotDate}}'::timestamp(6)
order by grs.snapshot_date asc
limit 1
`, map[string]string{"snapshotDate": snapshotDate})
`, map[string]interface{}{"snapshotDate": snapshotDate})

if err != nil {
rc.logger.Sugar().Errorw("Failed to render query template", "error", err)
Expand Down
4 changes: 2 additions & 2 deletions pkg/snapshot/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ func TestSetupRestore(t *testing.T) {
func setup() (*config.Config, *zap.Logger, error) {
cfg := config.NewConfig()
cfg.Chain = config.Chain_Mainnet
cfg.Debug = false
cfg.Debug = os.Getenv(config.Debug) == "true"
cfg.DatabaseConfig = *tests.GetDbConfigFromEnv()

l, err := logger.NewLogger(&logger.LoggerConfig{Debug: true})
l, err := logger.NewLogger(&logger.LoggerConfig{Debug: cfg.Debug})
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit 1e62fa8

Please sign in to comment.