Skip to content

Commit

Permalink
refactor(act): fixed typos, common controller receiver name, removed …
Browse files Browse the repository at this point in the history
…unused func
  • Loading branch information
aranyia committed May 16, 2024
1 parent 4b1e548 commit 5c5706c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pkg/dynamicaccess/accesslogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"crypto/ecdsa"
"fmt"

encryption "github.com/ethersphere/bee/v2/pkg/encryption"
"github.com/ethersphere/bee/v2/pkg/encryption"
"github.com/ethersphere/bee/v2/pkg/kvs"
"github.com/ethersphere/bee/v2/pkg/swarm"
"golang.org/x/crypto/sha3"
Expand Down
16 changes: 3 additions & 13 deletions pkg/dynamicaccess/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ import (
"io"
"time"

encryption "github.com/ethersphere/bee/v2/pkg/encryption"
"github.com/ethersphere/bee/v2/pkg/encryption"
"github.com/ethersphere/bee/v2/pkg/file"
"github.com/ethersphere/bee/v2/pkg/file/pipeline"
"github.com/ethersphere/bee/v2/pkg/file/pipeline/builder"
"github.com/ethersphere/bee/v2/pkg/file/redundancy"
"github.com/ethersphere/bee/v2/pkg/kvs"
"github.com/ethersphere/bee/v2/pkg/storage"
"github.com/ethersphere/bee/v2/pkg/swarm"
)

Expand Down Expand Up @@ -265,7 +261,7 @@ func (c *ControllerStruct) HandleGrantees(
return glref, eglref, href, actref, nil
}

func (c *ControllerStruct) GetGrantees(ctx context.Context, ls file.LoadSaver, publisher *ecdsa.PublicKey, encryptedglref swarm.Address) ([]*ecdsa.PublicKey, error) {
func (c *ControllerStruct) GetGrantees(_ context.Context, ls file.LoadSaver, publisher *ecdsa.PublicKey, encryptedglref swarm.Address) ([]*ecdsa.PublicKey, error) {
granteeRef, err := c.decryptRefForPublisher(publisher, encryptedglref)
if err != nil {
return nil, err
Expand Down Expand Up @@ -305,13 +301,7 @@ func (c *ControllerStruct) decryptRefForPublisher(publisherPubKey *ecdsa.PublicK
return swarm.NewAddress(ref), nil
}

func requestPipelineFactory(ctx context.Context, s storage.Putter, encrypt bool, rLevel redundancy.Level) func() pipeline.Interface {
return func() pipeline.Interface {
return builder.NewPipelineBuilder(ctx, s, encrypt, rLevel)
}
}

// TODO: what to do in close ?
func (s *ControllerStruct) Close() error {
func (c *ControllerStruct) Close() error {
return nil
}

0 comments on commit 5c5706c

Please sign in to comment.