OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix height
[bytom/vapor.git]
/
toolbar
/
precog
/
monitor
/
stats.go
diff --git
a/toolbar/precog/monitor/stats.go
b/toolbar/precog/monitor/stats.go
index
2162892
..
b8b03c6
100644
(file)
--- a/
toolbar/precog/monitor/stats.go
+++ b/
toolbar/precog/monitor/stats.go
@@
-157,7
+157,9
@@
func (m *monitor) processPeerInfo(dbTx *gorm.DB, peerInfo *peers.PeerInfo) error
}
}
ormNodeLiveness.PongTimes += 1
- ormNodeLiveness.BestHeight = peerInfo.Height
+ if peerInfo.Height != 0 {
+ ormNodeLiveness.BestHeight = peerInfo.Height
+ }
if err := dbTx.Save(ormNodeLiveness).Error; err != nil {
return err
}