aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-14 19:54:40 +0800
committerobscuren <geffobscura@gmail.com>2014-05-14 19:54:40 +0800
commitf4fa0d48cb10f925908062357be965c54370cba9 (patch)
tree4b274e1a6a25fb6a468d52a2e1e67775b42d0a0f /peer.go
parent0512113bdd5cc55ae35abd442b668ab5ed7a116b (diff)
downloaddexon-f4fa0d48cb10f925908062357be965c54370cba9.tar
dexon-f4fa0d48cb10f925908062357be965c54370cba9.tar.gz
dexon-f4fa0d48cb10f925908062357be965c54370cba9.tar.bz2
dexon-f4fa0d48cb10f925908062357be965c54370cba9.tar.lz
dexon-f4fa0d48cb10f925908062357be965c54370cba9.tar.xz
dexon-f4fa0d48cb10f925908062357be965c54370cba9.tar.zst
dexon-f4fa0d48cb10f925908062357be965c54370cba9.zip
Moved keyring to ethutil & removed old methods. Implements #20
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/peer.go b/peer.go
index 70759f246..433ce161f 100644
--- a/peer.go
+++ b/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