Skip to content

Commit a9251f2

Browse files
committed
update: init ecc logger
1 parent 78396da commit a9251f2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

consensus/eccpow/algorithm.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type Mode uint
4747
const (
4848
epochLength = 30000 // Blocks per epoch
4949
ModeNormal Mode = iota
50-
//ModeShared
50+
ModeShared
5151
ModeTest
5252
ModeFake
5353
ModeFullFake
@@ -290,6 +290,9 @@ func MakeDecision_Seoul(header *types.Header, colInRow [][]int, outputWord []int
290290
// packages.
291291

292292
func New(config Config, notify []string, noverify bool) *ECC {
293+
if config.Log == nil {
294+
config.Log = log.Root()
295+
}
293296
ecc := &ECC{
294297
config: config,
295298
update: make(chan struct{}),
@@ -300,7 +303,10 @@ func New(config Config, notify []string, noverify bool) *ECC {
300303
fetchRateCh: make(chan chan uint64),
301304
submitRateCh: make(chan *hashrate),
302305
}
303-
//ecc.remote = startRemoteSealer(ecc, notify, noverify)
306+
if config.PowMode == ModeShared {
307+
ecc.shared = sharedECC
308+
}
309+
ecc.remote = startRemoteSealer(ecc, notify, noverify)
304310
return ecc
305311
}
306312

0 commit comments

Comments
 (0)