代码拉取完成,页面将自动刷新
package consensus
import (
"gitee.com/aiou-official/go-aiou/chainbase"
"gitee.com/aiou-official/go-aiou/common/config"
"gitee.com/aiou-official/go-aiou/consensus/pob"
"gitee.com/aiou-official/go-aiou/p2p"
)
// Type is the type of consensus
type Type uint8
// The types of consensus
const (
_ Type = iota
Pob
)
// Consensus is a consensus server.
type Consensus interface {
Start() error
Stop()
}
// New returns the different consensus strategy.
func New(cType Type, conf *config.Config, chainBase *chainbase.ChainBase, service p2p.Service) Consensus {
switch cType {
case Pob:
return pob.New(conf, chainBase, service)
default:
return pob.New(conf, chainBase, service)
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。