Moved keyring to ethutil & removed old methods. Implements #20
This commit is contained in:
4
peer.go
4
peer.go
@ -581,8 +581,8 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) {
|
||||
p.port = uint16(c.Get(4).Uint())
|
||||
|
||||
// Self connect detection
|
||||
key := ethutil.Config.Db.GetKeys()[0]
|
||||
if bytes.Compare(key.PublicKey, p.pubkey) == 0 {
|
||||
keyPair := ethutil.GetKeyRing().Get(0)
|
||||
if bytes.Compare(keyPair.PublicKey, p.pubkey) == 0 {
|
||||
p.Stop()
|
||||
|
||||
return
|
||||
|
Reference in New Issue
Block a user