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 {
Node *enode.Node `json:"node"`
AddedTable time.Time `json:"addedToTable"`
AddedBucket time.Time `json:"addedToBucket"`
Checks int `json:"checks"`
Live bool `json:"live"`
Node *enode.Node `json:"node"`
AddedToTable time.Time `json:"addedToTable"`
AddedToBucket time.Time `json:"addedToBucket"`
Checks int `json:"checks"`
Live bool `json:"live"`
}
// 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))
for j, n := range b.entries {
nodes[i][j] = BucketNode{
Node: n.Node,
Checks: int(n.livenessChecks),
Live: n.isValidatedLive,
AddedTable: n.addedToTable,
AddedBucket: n.addedToBucket,
Node: n.Node,
Checks: int(n.livenessChecks),
Live: n.isValidatedLive,
AddedToTable: n.addedToTable,
AddedToBucket: n.addedToBucket,
}
}
}