diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-27 07:08:59 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-27 07:08:59 +0800 |
commit | 6e24d603a157ba6f66d49132d16221d9adbdff4d (patch) | |
tree | 4a3976d94fedcb8fc51820591107d1013338f701 | |
parent | 5cdfee51437532ccfb49e874fdbbea2702c3d13f (diff) | |
parent | 24a6d87c3f4bc69fdd1c619b36f8b74a61fd8bae (diff) | |
download | go-tangerine-6e24d603a157ba6f66d49132d16221d9adbdff4d.tar go-tangerine-6e24d603a157ba6f66d49132d16221d9adbdff4d.tar.gz go-tangerine-6e24d603a157ba6f66d49132d16221d9adbdff4d.tar.bz2 go-tangerine-6e24d603a157ba6f66d49132d16221d9adbdff4d.tar.lz go-tangerine-6e24d603a157ba6f66d49132d16221d9adbdff4d.tar.xz go-tangerine-6e24d603a157ba6f66d49132d16221d9adbdff4d.tar.zst go-tangerine-6e24d603a157ba6f66d49132d16221d9adbdff4d.zip |
Merge branch 'develop' of github.com-obscure:ethereum/eth-go into develop
-rw-r--r-- | peer.go | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -531,13 +531,16 @@ func (p *Peer) Stop() { } func (p *Peer) pushHandshake() error { - pubkey := ethutil.GetKeyRing().Get(0).PublicKey + keyRing := ethutil.GetKeyRing().Get(0) + if keyRing != nil { + pubkey := keyRing.PublicKey - msg := ethwire.NewMessage(ethwire.MsgHandshakeTy, []interface{}{ - uint32(ProtocolVersion), uint32(0), p.Version, byte(p.caps), p.port, pubkey[1:], - }) + msg := ethwire.NewMessage(ethwire.MsgHandshakeTy, []interface{}{ + uint32(ProtocolVersion), uint32(0), p.Version, byte(p.caps), p.port, pubkey[1:], + }) - p.QueueMessage(msg) + p.QueueMessage(msg) + } return nil } |