From efb8a4ee5938c686d7bbe813b21a1672f5ba014e Mon Sep 17 00:00:00 2001 From: Bryan White Date: Fri, 10 Nov 2023 14:32:43 +0100 Subject: [PATCH] chore: simplify --- pkg/relayer/miner/miner.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/relayer/miner/miner.go b/pkg/relayer/miner/miner.go index 948076c61..eb2015fbd 100644 --- a/pkg/relayer/miner/miner.go +++ b/pkg/relayer/miner/miner.go @@ -59,9 +59,7 @@ func NewMiner( opt(mnr) } - if err := mnr.setDefaults(); err != nil { - return nil, err - } + mnr.setDefaults() return mnr, nil } @@ -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