forked from cerc-io/plugeth
Merge branch 'develop' of github.com-obscure:ethereum/eth-go into develop
This commit is contained in:
commit
6e24d603a1
5
peer.go
5
peer.go
@ -531,13 +531,16 @@ func (p *Peer) Stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *Peer) pushHandshake() error {
|
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{}{
|
msg := ethwire.NewMessage(ethwire.MsgHandshakeTy, []interface{}{
|
||||||
uint32(ProtocolVersion), uint32(0), p.Version, byte(p.caps), p.port, pubkey[1:],
|
uint32(ProtocolVersion), uint32(0), p.Version, byte(p.caps), p.port, pubkey[1:],
|
||||||
})
|
})
|
||||||
|
|
||||||
p.QueueMessage(msg)
|
p.QueueMessage(msg)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user