• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: Commit

Golang implemented sidechain for Bytom


Commit MetaInfo

Revisioncef931a96aa15c0bbd1fcb8dec0ec709707d10ed (tree)
Time2019-08-14 12:00:24
AuthorHAOYUatHZ <haoyu@prot...>
CommiterHAOYUatHZ

Log Message

fix

Change Summary

Incremental Difference

--- a/toolbar/precog/monitor/monitor.go
+++ b/toolbar/precog/monitor/monitor.go
@@ -169,7 +169,9 @@ func (m *monitor) connectNodesRoutine() {
169169 ticker := time.NewTicker(time.Duration(m.cfg.CheckFreqSeconds) * time.Second)
170170 for ; true; <-ticker.C {
171171 // TODO: lock?
172- m.dialNodes()
172+ if err := m.dialNodes(); err != nil {
173+ log.Error(err)
174+ }
173175 }
174176 }
175177
@@ -182,7 +184,12 @@ func (m *monitor) dialNodes() error {
182184 addresses := make([]*p2p.NetAddress, 0)
183185 for i := 0; i < len(nodes); i++ {
184186 ips, err := net.LookupIP(nodes[i].Host)
185- if err != nil || len(ips) == 0 {
187+ if err != nil {
188+ log.Error(err)
189+ continue
190+ }
191+ if len(ips) == 0 {
192+ log.Error("fail to look up ip")
186193 continue
187194 }
188195
Show on old repository browser