Moved keyring to ethutil & removed old methods. Implements #20

This commit is contained in:
obscuren
2014-05-14 13:54:40 +02:00
parent 0512113bdd
commit f4fa0d48cb
9 changed files with 122 additions and 118 deletions

View File

@ -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