p2p/discover: rename fields

This commit is contained in:
Felix Lange 2024-05-21 14:16:59 +02:00
parent f0504f699b
commit cda6f56ee9
2 changed files with 10 additions and 10 deletions

View file

@ -30,11 +30,11 @@ import (
) )
type BucketNode struct { type BucketNode struct {
Node *enode.Node `json:"node"` Node *enode.Node `json:"node"`
AddedTable time.Time `json:"addedToTable"` AddedToTable time.Time `json:"addedToTable"`
AddedBucket time.Time `json:"addedToBucket"` AddedToBucket time.Time `json:"addedToBucket"`
Checks int `json:"checks"` Checks int `json:"checks"`
Live bool `json:"live"` Live bool `json:"live"`
} }
// node represents a host on the network. // node represents a host on the network.

View file

@ -163,11 +163,11 @@ func (tab *Table) Nodes() [][]BucketNode {
nodes[i] = make([]BucketNode, len(b.entries)) nodes[i] = make([]BucketNode, len(b.entries))
for j, n := range b.entries { for j, n := range b.entries {
nodes[i][j] = BucketNode{ nodes[i][j] = BucketNode{
Node: n.Node, Node: n.Node,
Checks: int(n.livenessChecks), Checks: int(n.livenessChecks),
Live: n.isValidatedLive, Live: n.isValidatedLive,
AddedTable: n.addedToTable, AddedToTable: n.addedToTable,
AddedBucket: n.addedToBucket, AddedToBucket: n.addedToBucket,
} }
} }
} }