Skip to content

Commit

Permalink
chore: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Nov 10, 2023
1 parent 55c8118 commit c1784f5
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions pkg/relayer/miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"crypto/sha256"
"hash"

"cosmossdk.io/depinject"

"github.com/pokt-network/poktroll/pkg/either"
"github.com/pokt-network/poktroll/pkg/observable"
"github.com/pokt-network/poktroll/pkg/observable/channel"
Expand Down Expand Up @@ -38,27 +36,15 @@ type miner struct {
// relayDifficulty is the minimum difficulty that a relay must have to be
// volume / reward applicable.
relayDifficulty int

// Injected dependencies
// sessionManaager facilitates the session (claim/proof) lifecycle.
sessionManager relayer.RelayerSessionsManager
}

// NewMiner creates a new miner from the given dependencies and options. It
// returns an error if it has not been sufficiently configured or supplied.
func NewMiner(
deps depinject.Config,
opts ...relayer.MinerOption,
) (*miner, error) {
mnr := &miner{}

if err := depinject.Inject(
deps,
&mnr.sessionManager,
); err != nil {
return nil, err
}

for _, opt := range opts {
opt(mnr)
}
Expand Down

0 comments on commit c1784f5

Please sign in to comment.