mirror of
https://github.com/luxfi/tui.git
synced 2026-10-30 15:14:53 +00:00
Lux unifies subnet (validator-set) and chain identity into a single
ChainID — every chain identifies itself by its ChainID, no separate
'subnet identifier' needed.
Wire/interface changes (BREAKING — coordinated rollout):
- node/message/wire: ChainSubnetPair struct → ChainPingEntry; collapsed
duplicate SubnetId field; ChainSubnetPairs → ChainIds
- node/proto/zap/p2p: SubnetID → ChainID
- node/vms/chainadapter: ICPBlock/ICPSubnet SubnetID → ChainID
- validators/uptime: Calculator interface params subnetID → chainID
- consensus/core/router: Connected method param subnetID → chainID
- p2p/message: outbound_msg_builder var renames
Config/UI changes (cleanup):
- genesis/pkg/genesis ChainEntry: dropped redundant SubnetID field
- tui/views/ChainStatus: dropped redundant SubnetID field
- cli: comment cleanup
- benchmarks: deploy-subnets var rename
50 lines
929 B
Go
50 lines
929 B
Go
// Copyright (C) 2024-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
// Package views provides view models for the Lux TUI.
|
|
package views
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// NodeStatus represents a node's status
|
|
type NodeStatus struct {
|
|
Name string
|
|
NodeID string
|
|
Status string
|
|
Version string
|
|
Uptime string
|
|
Connected int
|
|
Staking bool
|
|
}
|
|
|
|
// ChainStatus represents a chain's status
|
|
type ChainStatus struct {
|
|
ChainID string
|
|
Name string
|
|
Type string
|
|
Height uint64
|
|
Status string
|
|
Validators int
|
|
TPS float64
|
|
}
|
|
|
|
// ValidatorStatus represents a validator's status
|
|
type ValidatorStatus struct {
|
|
NodeID string
|
|
Stake string
|
|
StartTime time.Time
|
|
EndTime time.Time
|
|
Uptime string
|
|
Connected bool
|
|
}
|
|
|
|
// LogEntry represents a log entry
|
|
type LogEntry struct {
|
|
Timestamp time.Time
|
|
Level string
|
|
Source string
|
|
Message string
|
|
}
|