From a9251f209cd5fa5f89c8bf41b95ec1d02f295c48 Mon Sep 17 00:00:00 2001 From: lvminer3 Date: Thu, 15 Feb 2024 15:38:11 +0900 Subject: [PATCH] update: init ecc logger --- consensus/eccpow/algorithm.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/consensus/eccpow/algorithm.go b/consensus/eccpow/algorithm.go index 499241c..353ebc4 100644 --- a/consensus/eccpow/algorithm.go +++ b/consensus/eccpow/algorithm.go @@ -47,7 +47,7 @@ type Mode uint const ( epochLength = 30000 // Blocks per epoch ModeNormal Mode = iota - //ModeShared + ModeShared ModeTest ModeFake ModeFullFake @@ -290,6 +290,9 @@ func MakeDecision_Seoul(header *types.Header, colInRow [][]int, outputWord []int // packages. func New(config Config, notify []string, noverify bool) *ECC { + if config.Log == nil { + config.Log = log.Root() + } ecc := &ECC{ config: config, update: make(chan struct{}), @@ -300,7 +303,10 @@ func New(config Config, notify []string, noverify bool) *ECC { fetchRateCh: make(chan chan uint64), submitRateCh: make(chan *hashrate), } - //ecc.remote = startRemoteSealer(ecc, notify, noverify) + if config.PowMode == ModeShared { + ecc.shared = sharedECC + } + ecc.remote = startRemoteSealer(ecc, notify, noverify) return ecc }