diff options
author | obscuren <geffobscura@gmail.com> | 2014-02-28 23:45:54 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-02-28 23:45:54 +0800 |
commit | ceada15290b6c8373c3bfaed86d953dd2a522d2b (patch) | |
tree | 170a5b8bbf6e791eb0c4b2aab0b56ced706539ab | |
parent | 839bd73fbb525f6c51e4205ce6519b6154cda2f0 (diff) | |
parent | b462ca4aade75049a0fcba23c54e340f0f793dfb (diff) | |
download | go-tangerine-ceada15290b6c8373c3bfaed86d953dd2a522d2b.tar go-tangerine-ceada15290b6c8373c3bfaed86d953dd2a522d2b.tar.gz go-tangerine-ceada15290b6c8373c3bfaed86d953dd2a522d2b.tar.bz2 go-tangerine-ceada15290b6c8373c3bfaed86d953dd2a522d2b.tar.lz go-tangerine-ceada15290b6c8373c3bfaed86d953dd2a522d2b.tar.xz go-tangerine-ceada15290b6c8373c3bfaed86d953dd2a522d2b.tar.zst go-tangerine-ceada15290b6c8373c3bfaed86d953dd2a522d2b.zip |
Merge branch 'hotfix/0.3.1'
-rw-r--r-- | ethereum.go | 2 | ||||
-rw-r--r-- | ethutil/config.go | 2 | ||||
-rw-r--r-- | peer.go | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/ethereum.go b/ethereum.go index 90682b396..b4a8cdb4a 100644 --- a/ethereum.go +++ b/ethereum.go @@ -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 diff --git a/ethutil/config.go b/ethutil/config.go index 5bf56134d..5fdc8e1c5 100644 --- a/ethutil/config.go +++ b/ethutil/config.go @@ -46,7 +46,7 @@ func ReadConfig(base string) *config { } } - Config = &config{ExecPath: path, Debug: true, Ver: "0.3.0"} + Config = &config{ExecPath: path, Debug: true, Ver: "0.3.1"} Config.Log = NewLogger(LogFile|LogStd, LogLevelDebug) } @@ -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 |