From: HAOYUatHZ Date: Sat, 31 Aug 2019 07:25:16 +0000 (+0800) Subject: clean up X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e3f238ce68d47d6d125a98f1b337f272c7a12978;p=bytom%2Fvapor.git clean up --- diff --git a/toolbar/precog/database/orm/node_liveness.go b/toolbar/precog/database/orm/node_liveness.go index 57e5377f..c708129e 100644 --- a/toolbar/precog/database/orm/node_liveness.go +++ b/toolbar/precog/database/orm/node_liveness.go @@ -12,9 +12,8 @@ type NodeLiveness struct { PongTimes uint64 AvgLantencyMS sql.NullInt64 BestHeight uint64 - // Status uint8 - CreatedAt time.Time - UpdatedAt time.Time + CreatedAt time.Time + UpdatedAt time.Time Node *Node `gorm:"foreignkey:NodeID"` } diff --git a/toolbar/precog/monitor/monitor.go b/toolbar/precog/monitor/monitor.go index cd5e77f4..04ca1bd4 100644 --- a/toolbar/precog/monitor/monitor.go +++ b/toolbar/precog/monitor/monitor.go @@ -26,8 +26,6 @@ import ( // TODO: // 1. moniker 理论是安全的,只是记得测试一下,这么改不会让vapor node出坑 -// 2. StatusMap 感觉没什么问题,double check一下别的出名项目是不是也是这么叫的 - // 3. toolbar/precog/monitor/stats.go FirstOrCreate&Update 弱弱的问一下,直接save会出事么? // 4. 碰到一个玄学问题,究竟是以ip为单位,还是pubkey为单位。 如果同一个pubkey出现在2个不同的ip,会不会让数据混乱? // 6. ***NodeLiveness应该是存每次的通讯记录?至于一些统计数据之类的都丢node上去?