Skip to content

Commit

Permalink
remove empty lines and keypair
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Jan 14, 2025
1 parent 2802cd6 commit 2e43636
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion core/eth/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ func (t *Reader) GetRegisteredQuorumIdsForOperator(ctx context.Context, operator

func (t *Reader) getRegistrationParams(
ctx context.Context,
keypair *core.KeyPair,
sdkSigner sdkSigner.Signer,
operatorEcdsaPrivateKey *ecdsa.PrivateKey,
operatorToAvsRegistrationSigSalt [32]byte,
Expand Down
9 changes: 5 additions & 4 deletions core/eth/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"github.com/Layr-Labs/eigenda/api"
dreg "github.com/Layr-Labs/eigenda/contracts/bindings/EigenDADisperserRegistry"
"log"
"math/big"

"github.com/Layr-Labs/eigenda/api"
dreg "github.com/Layr-Labs/eigenda/contracts/bindings/EigenDADisperserRegistry"

"github.com/Layr-Labs/eigenda/api/grpc/churner"
"github.com/Layr-Labs/eigenda/common"
eigendasrvmg "github.com/Layr-Labs/eigenda/contracts/bindings/EigenDAServiceManager"
Expand Down Expand Up @@ -71,7 +72,7 @@ func (t *Writer) RegisterOperator(
operatorToAvsRegistrationSigExpiry *big.Int,
) error {

params, operatorSignature, err := t.getRegistrationParams(ctx, keypair, signer, operatorEcdsaPrivateKey, operatorToAvsRegistrationSigSalt, operatorToAvsRegistrationSigExpiry)
params, operatorSignature, err := t.getRegistrationParams(ctx, signer, operatorEcdsaPrivateKey, operatorToAvsRegistrationSigSalt, operatorToAvsRegistrationSigExpiry)
if err != nil {
t.logger.Error("Failed to get registration params", "err", err)
return err
Expand Down Expand Up @@ -113,7 +114,7 @@ func (t *Writer) RegisterOperatorWithChurn(
churnReply *churner.ChurnReply,
) error {

params, operatorSignature, err := t.getRegistrationParams(ctx, keypair, signer, operatorEcdsaPrivateKey, operatorToAvsRegistrationSigSalt, operatorToAvsRegistrationSigExpiry)
params, operatorSignature, err := t.getRegistrationParams(ctx, signer, operatorEcdsaPrivateKey, operatorToAvsRegistrationSigSalt, operatorToAvsRegistrationSigExpiry)
if err != nil {
t.logger.Error("Failed to get registration params", "err", err)
return err
Expand Down
3 changes: 1 addition & 2 deletions node/churner_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type ChurnerClient interface {
// Churn sends a churn request to the churner service
// The quorumIDs cannot be empty, but may contain quorums that the operator is already registered in.
// If the operator is already registered in a quorum, the churner will ignore it and continue with the other quorums.
Churn(ctx context.Context, operatorAddress string, keyPair *core.KeyPair, sdkSigner sdkSigner.Signer, quorumIDs []core.QuorumID) (*churnerpb.ChurnReply, error)
Churn(ctx context.Context, operatorAddress string, sdkSigner sdkSigner.Signer, quorumIDs []core.QuorumID) (*churnerpb.ChurnReply, error)
}

type churnerClient struct {
Expand All @@ -46,7 +46,6 @@ func NewChurnerClient(churnerURL string, useSecureGrpc bool, timeout time.Durati
func (c *churnerClient) Churn(
ctx context.Context,
operatorAddress string,
keyPair *core.KeyPair,
sdkSigner sdkSigner.Signer,
quorumIDs []core.QuorumID,
) (*churnerpb.ChurnReply, error) {
Expand Down
2 changes: 1 addition & 1 deletion node/mock/churner_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type ChurnerClient struct {

var _ node.ChurnerClient = (*ChurnerClient)(nil)

func (c *ChurnerClient) Churn(ctx context.Context, operatorAddress string, keyPair *core.KeyPair, signer sdkSigner.Signer, quorumIDs []core.QuorumID) (*churnerpb.ChurnReply, error) {
func (c *ChurnerClient) Churn(ctx context.Context, operatorAddress string, signer sdkSigner.Signer, quorumIDs []core.QuorumID) (*churnerpb.ChurnReply, error) {
args := c.Called()
var reply *churnerpb.ChurnReply
if args.Get(0) != nil {
Expand Down
2 changes: 1 addition & 1 deletion node/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func RegisterOperator(ctx context.Context, operator *Operator, transactor core.W

// if we should call the churner, call it
if shouldCallChurner {
churnReply, err := churnerClient.Churn(ctx, operator.Address, operator.KeyPair, operator.Signer, quorumsToRegister)
churnReply, err := churnerClient.Churn(ctx, operator.Address, operator.Signer, quorumsToRegister)
if err != nil {
return fmt.Errorf("failed to request churn approval: %w", err)
}
Expand Down
1 change: 0 additions & 1 deletion node/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package node_test

import (
"context"

"strings"
"testing"
"time"
Expand Down
1 change: 0 additions & 1 deletion retriever/eth/chain_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package eth_test
import (
"context"
"encoding/hex"

"math/big"
"testing"

Expand Down

0 comments on commit 2e43636

Please sign in to comment.