OSDN Git Service

add best_height for liveness
authorHAOYUatHZ <haoyu@protonmail.com>
Tue, 13 Aug 2019 01:26:42 +0000 (09:26 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Tue, 13 Aug 2019 01:26:42 +0000 (09:26 +0800)
docs/precog/sql_dump/precog_schema.sql
toolbar/precog/database/orm/node_liveness.go

index 36d5263..b460e51 100644 (file)
@@ -43,6 +43,7 @@ CREATE TABLE `node_livenesses` (
   `ping_times` int(11) DEFAULT '0',
   `pong_times` int(11) DEFAULT '0',
   `avg_lantency_ms` int(11) DEFAULT NULL,
+  `best_height` int(11) DEFAULT '0',
   `status` tinyint(1) NOT NULL DEFAULT '0',
   `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
   `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
index f6fd4e0..20e1f65 100644 (file)
@@ -10,6 +10,7 @@ type NodeLiveness struct {
        PingTimes     uint64
        PongTimes     uint64
        AvgLantencyMS sql.NullInt64
+       BestHeight    uint64
        Status        uint8
        CreatedAt     time.Time
        UpdatedAt     time.Time