Skip to content

Commit

Permalink
updated snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
0xrajath committed Nov 22, 2024
1 parent c571d20 commit 6c3355a
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions pkg/rewards/rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ import (
"bytes"
"errors"
"fmt"
"time"

"github.com/Layr-Labs/eigenlayer-rewards-proofs/pkg/distribution"
"github.com/Layr-Labs/sidecar/pkg/postgres/helpers"
"github.com/Layr-Labs/sidecar/pkg/storage"
"github.com/Layr-Labs/sidecar/pkg/utils"
gethcommon "github.com/ethereum/go-ethereum/common"
"github.com/wealdtech/go-merkletree/v2"
"gorm.io/gorm/clause"
"time"

"text/template"

"github.com/Layr-Labs/sidecar/internal/config"
"go.uber.org/zap"
"gorm.io/gorm"
"text/template"
)

type RewardsCalculator struct {
Expand Down Expand Up @@ -291,6 +293,18 @@ func (rc *RewardsCalculator) generateSnapshotData(snapshotDate string) error {
}
rc.logger.Sugar().Debugw("Generated staker delegation snapshots")

if err = rc.GenerateAndInsertOperatorAvsSplitSnapshots(snapshotDate); err != nil {
rc.logger.Sugar().Errorw("Failed to generate operator avs split snapshots", "error", err)
return err
}
rc.logger.Sugar().Debugw("Generated operator avs split snapshots")

if err = rc.GenerateAndInsertOperatorPISplitSnapshots(snapshotDate); err != nil {
rc.logger.Sugar().Errorw("Failed to generate operator pi snapshots", "error", err)
return err
}
rc.logger.Sugar().Debugw("Generated operator pi snapshots")

return nil
}

Expand Down

0 comments on commit 6c3355a

Please sign in to comment.