dir : eth/ethconfig/config.go
engine 선택
var engine consensus.Engine
// clique config가 있을 경우
if cliqueConfig != nil {
engine = clique.New(cliqueConfig, db)
// > consensus/clique/clique.go
}
// clique config가 없을 경우 조건에 맞는 ethash engine 생성
else {
...
engine = ethash.new(ethash.Config{
...
}, notify, noverify)
engine.(*ethash.Ethash).SetThreads(-1) // disable cpu mining
}
// 주어진 embedded eth1 engine을 이용해 합의 엔진 생성
return beacon.New(engine)
eth.New()