forked from cerc-io/plugeth
Fixed shutting down
This commit is contained in:
parent
839bd73fbb
commit
601340bd46
@ -295,7 +295,7 @@ func (s *Ethereum) Stop() {
|
||||
s.TxPool.Stop()
|
||||
s.BlockManager.Stop()
|
||||
|
||||
s.shutdownChan <- true
|
||||
close(s.shutdownChan)
|
||||
}
|
||||
|
||||
// This function will wait for a shutdown and resumes main thread execution
|
||||
|
5
peer.go
5
peer.go
@ -511,9 +511,8 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) {
|
||||
p.port = uint16(c.Get(4).Uint())
|
||||
|
||||
// Self connect detection
|
||||
data, _ := ethutil.Config.Db.Get([]byte("KeyRing"))
|
||||
pubkey := ethutil.NewValueFromBytes(data).Get(2).Bytes()
|
||||
if bytes.Compare(pubkey, p.pubkey) == 0 {
|
||||
key := ethutil.Config.Db.GetKeys()[0]
|
||||
if bytes.Compare(key.PublicKey, p.pubkey) == 0 {
|
||||
p.Stop()
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user