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 1eae9d2 commit efb8a4e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/relayer/miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ func NewMiner(
opt(mnr)
}

if err := mnr.setDefaults(); err != nil {
return nil, err
}
mnr.setDefaults()

return mnr, nil
}
Expand All @@ -84,11 +82,10 @@ func (mnr *miner) MinedRelays(

// setDefaults ensures that the miner has been configured with a hasherConstructor and uses
// the default hasherConstructor if not.
func (mnr *miner) setDefaults() error {
func (mnr *miner) setDefaults() {
if mnr.hasherConstructor == nil {
mnr.hasherConstructor = defaultHasherConstructor
}
return nil
}

// mapMineRelay is intended to be used as a MapFn. It hashes the relay and compares
Expand Down

0 comments on commit efb8a4e

Please sign in to comment.