Commit c7bc6849 authored by obscuren's avatar obscuren

Moved peer helper metheds

parent 96272e19
package eth
import (
"encoding/json"
"net"
"sync"
......@@ -214,22 +213,6 @@ func (s *Ethereum) WaitForShutdown() {
<-s.shutdownChan
}
func WritePeers(path string, addresses []string) {
if len(addresses) > 0 {
data, _ := json.MarshalIndent(addresses, "", " ")
ethutil.WriteFile(path, data)
}
}
func ReadPeers(path string) (ips []string, err error) {
var data string
data, err = ethutil.ReadAllFile(path)
if err != nil {
json.Unmarshal([]byte(data), &ips)
}
return
}
// now tx broadcasting is taken out of txPool
// handled here via subscription, efficiency?
func (self *Ethereum) txBroadcastLoop() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment