mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 12:51:22 +00:00
remove PoW from ID
This commit is contained in:
@ -368,11 +368,8 @@ func (n *Node) OnStart() error {
|
||||
n.sw.AddListener(l)
|
||||
|
||||
// Generate node PrivKey
|
||||
// TODO: both the loading function and the target
|
||||
// will need to be configurable
|
||||
difficulty := uint8(16) // number of leading 0s in bitstring
|
||||
target := p2p.MakePoWTarget(difficulty)
|
||||
nodeKey, err := p2p.LoadOrGenNodeKey(n.config.NodeKeyFile(), target)
|
||||
// TODO: the loading function will need to be configurable
|
||||
nodeKey, err := p2p.LoadOrGenNodeKey(n.config.NodeKeyFile())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -381,7 +378,6 @@ func (n *Node) OnStart() error {
|
||||
// Start the switch
|
||||
n.sw.SetNodeInfo(n.makeNodeInfo(nodeKey.PubKey()))
|
||||
n.sw.SetNodeKey(nodeKey)
|
||||
n.sw.SetPeerIDTarget(target)
|
||||
err = n.sw.Start()
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user