提交 18724183 编写于 作者: Z zelig

eth: remove disused peer_util.go

上级 3ea99f98
package eth
import (
"encoding/json"
"github.com/ethereum/go-ethereum/common"
)
func WritePeers(path string, addresses []string) {
if len(addresses) > 0 {
data, _ := json.MarshalIndent(addresses, "", " ")
common.WriteFile(path, data)
}
}
func ReadPeers(path string) (ips []string, err error) {
var data string
data, err = common.ReadAllFile(path)
if err != nil {
json.Unmarshal([]byte(data), &ips)
}
return
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册