OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e9345f
)
fix bestHeight?
author
HAOYUatHZ
<haoyu@protonmail.com>
Sun, 1 Sep 2019 03:07:35 +0000
(11:07 +0800)
committer
HAOYUatHZ
<haoyu@protonmail.com>
Sun, 1 Sep 2019 03:07:35 +0000
(11:07 +0800)
toolbar/precog/monitor/stats.go
patch
|
blob
|
history
diff --git
a/toolbar/precog/monitor/stats.go
b/toolbar/precog/monitor/stats.go
index
52d9134
..
6e2cc1b
100644
(file)
--- a/
toolbar/precog/monitor/stats.go
+++ b/
toolbar/precog/monitor/stats.go
@@
-156,6
+156,7
@@
func (m *monitor) processPeerInfo(dbTx *gorm.DB, peerInfo *peers.PeerInfo) error
latestLiveness.PongTimes += 1
if peerInfo.Height != 0 {
latestLiveness.BestHeight = peerInfo.Height
+ ormNode.BestHeight = peerInfo.Height
}
if err := dbTx.Save(latestLiveness).Error; err != nil {
return err
@@
-174,6
+175,5
@@
func (m *monitor) processPeerInfo(dbTx *gorm.DB, peerInfo *peers.PeerInfo) error
ormNode.LatestDailyUptimeMinutes = uint64(total.Minutes())
ormNode.Alias = peerInfo.Moniker
ormNode.Xpub = peerInfo.ID
- ormNode.BestHeight = peerInfo.Height
return dbTx.Save(ormNode).Error
}